fix bug in insert
authorTony Mack <tmack@cs.princeton.edu>
Mon, 13 Jul 2009 19:20:48 +0000 (19:20 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Mon, 13 Jul 2009 19:20:48 +0000 (19:20 +0000)
sfa/util/genitable.py

index d6b97cf..f373ecb 100644 (file)
@@ -73,7 +73,7 @@ class GeniTable:
 
     def insert(self, record):
         dont_insert = ['date_created', 'last_updated']
-        fields = [field for field in  record.keys() if field not in dont_insert]  
+        fields = [field for field in  record.fields.keys() if field not in dont_insert]  
         fieldnames = ["key"] + fields
         fieldvals = record.get_field_value_strings(fieldnames)
         query_str = "INSERT INTO " + self.tablename + \