Project

General

Profile

« Previous | Next » 

Revision 3426

db_xml.py: Don't remove any explicit pkey because the output table may be a SQL function, which does not have a pkey. This feature only existed to support importing VegBank XML exports, which we don't use (and which would be incompatible with the schema anyway).

View differences:

lib/db_xml.py
89 89
            row[child_name] = strings.to_unicode(xml_dom.value(child))
90 90
        elif is_ptr(child_name): row[child_name] = put_(ptr_target(child))
91 91
        else: children.append(child)
92
    try: del row[pkey_]
93
    except KeyError: pass
94 92
    
95 93
    # Add fkey to parent
96 94
    if parent_id != None:
......
233 231
    
234 232
    def pkey(table): return sql.pkey(db, table, True)
235 233
    
236
    # Remove any explicit pkey
237
    try: del row[pkey(out_table)]
238
    except KeyError: pass
239
    
240 234
    # Add fkey to parent
241 235
    if parent_ids_loc != None:
242 236
        no_empty.add(parent_ids_loc.table)

Also available in: Unified diff