added get_field()
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 7 Mar 2012 19:10:04 +0000 (14:10 -0500)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 7 Mar 2012 19:10:04 +0000 (14:10 -0500)
sfa/storage/record.py

index 5c5238e..fcde62c 100644 (file)
@@ -14,6 +14,10 @@ class Record:
             xml_dict = xml_record.todict()
             self.load_from_dict(xml_dict)  
 
+
+    def get_field(self, field):
+        return self.__dict__.get(field, None)
+
     # xxx fixme
     # turns out the date_created field is received by the client as a 'created' int
     # (and 'last_updated' does not make it at all)