Project

General

Profile

« Previous | Next » 

Revision 4035

xml_func.py: _name(): Fixed bug where needed to pass None values through and handle no name parts to properly support NULL propagation

View differences:

inputs/SALVIAS-CSV/test/import.organisms.xml.ref
284 284
        </parent_id>
285 285
    </location>
286 286
</VegBIEN>
287
Inserted 53 new rows into database
287
Inserted 51 new rows into database
inputs/SALVIAS/test/import.organisms.xml.ref
267 267
        </parent_id>
268 268
    </location>
269 269
</VegBIEN>
270
Inserted 46 new rows into database
270
Inserted 44 new rows into database
lib/xml_func.py
299 299
    parts = []
300 300
    for part in name_parts:
301 301
        if part in items: parts.append(items[part])
302
    if not parts: return None # pass None values through; handle no name parts
302 303
    return ' '.join(parts)
303 304
funcs['_name'] = _name
304 305

  

Also available in: Unified diff