Changeset 2390


Ignore:
Timestamp:
10/04/07 14:54:44 (12 years ago)
Author:
lawrence
Message:

Tiny fix for address handling with empty elements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/PythonCode/wsgi/People2.py

    r2386 r2390  
    118118            a=[] 
    119119            # we don't need the helper because we're getting the tags from the element. 
    120             # should we worry about empty elements here? 
    121             for t in helper.find(elem,'Contact_Address'):a.append(t.text) 
     120            # should we worry about empty elements here? yes! 
     121            for t in helper.find(elem,'Contact_Address'): 
     122                if t.text is not None: a.append(t.text) 
    122123            self.core['address']=a 
    123124            self.core['name']=helper.getText(elem,'First_Name')+' '+helper.getText(elem,'Last_Name') 
Note: See TracChangeset for help on using the changeset viewer.