Changeset 2721 in products


Ignore:
Timestamp:
Aug 4, 2010 2:11:38 PM (10 years ago)
Author:
mylan
Message:

Fix wrong processing of BaseUnit? field value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.transmogrifier/branches/dictionary/quintagroup/transmogrifier/namespaces/atns.py

    r2720 r2721  
    5959 
    6060        is_ref = self.isReference(instance) 
    61          
    6261        for value in values: 
    6362            node = dom.createElementNS(self.namespace.xmlns, "field") 
     
    6564            name_attr.value = self.name 
    6665            node.setAttributeNode(name_attr) 
    67              
    68             # try to get 'utf-8' encoded string 
    69             items = getattr(value, 'items', _marker) 
     66            # map and not map fields 
     67            # take-off aquisition 
     68            if hasattr(value, 'aq_base'): 
     69                chck_val = value.aq_base 
     70            else: 
     71                chck_val = value 
     72            items = getattr(chck_val, 'items', _marker) 
    7073            if items is not _marker and callable(items): 
    7174                # Map field 
Note: See TracChangeset for help on using the changeset viewer.