Revision 451
Added by Aaron Marcuse-Kubitza almost 13 years ago
lib/db_xml.py | ||
---|---|---|
77 | 77 |
child_name = name_of(child) |
78 | 78 |
if xml_dom.is_text(child): |
79 | 79 |
row[child_name] = strings.to_unicode(xml_dom.value(child)) |
80 |
elif not xml_dom.has_elems(child): pass # ignore empty field |
|
80 | 81 |
elif is_ptr(child_name): |
81 | 82 |
row[child_name] = put(db, ptr_target(child), store_ids, |
82 | 83 |
row_ct_ref, pkeys) |
Also available in: Unified diff
db_xml.py: Ignore empty fields. Fixes bug where a field that's not text but has no Element children will be treated as a table, and an error is triggered because the corresponding table does not exist in the database.