Project

General

Profile

« Previous | Next » 

Revision 73

map: Fixed bugs to enable mapping straight from CSV to a database. Still need a way to set plot.authorPlotCode for specimens data.

View differences:

db_xml.py
67 67
            break
68 68
        except sql.NullValueException, ex:
69 69
            if try_num > 0: raise # exception still raised after retry
70
            # Search for required column in ancestors and their children
71
            target = find_by_name(node, ptr_type(ex.col))
72
            if target == None: raise
73
            row[ex.col] = xml_dom.get_id(target)
70
            if is_ptr(ex.col):
71
                # Search for required column in ancestors and their children
72
                target = find_by_name(node, ptr_type(ex.col))
73
                if target == None: raise
74
                row[ex.col] = xml_dom.get_id(target)
75
            else: raise
74 76
    
75 77
    # Insert children with fkeys to parent
76 78
    for child in children: put(db, child, store_ids, row_ct_ref, pkeys, id_)

Also available in: Unified diff