From: Tony Mack Date: Wed, 7 Mar 2012 19:10:04 +0000 (-0500) Subject: added get_field() X-Git-Tag: sfa-2.1-4~81 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;ds=sidebyside;h=93e3ae9d4682c6a8d269bc5d2b92706b2b66ab28;p=sfa.git added get_field() --- diff --git a/sfa/storage/record.py b/sfa/storage/record.py index 5c5238e2..fcde62cb 100644 --- a/sfa/storage/record.py +++ b/sfa/storage/record.py @@ -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)