From: Tony Mack Date: Wed, 14 Oct 2009 16:30:07 +0000 (+0000) Subject: update the record's last updated field with the current time. last_updated field... X-Git-Tag: sfa-0.9-6~188 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=17946dee2698e6c1ed9ccaddc5489e010ce2ea00;p=sfa.git update the record's last updated field with the current time. last_updated field will be ignored until the readonly attribute is removed from the field definition in GeniRecord.fields --- diff --git a/sfa/methods/update.py b/sfa/methods/update.py index 2e97a5b4..7d9e0073 100644 --- a/sfa/methods/update.py +++ b/sfa/methods/update.py @@ -1,6 +1,7 @@ ### $Id$ ### $URL$ +import time from sfa.util.faults import * from sfa.util.method import Method from sfa.util.parameter import Parameter, Mixed @@ -50,6 +51,7 @@ class update(Method): if not records: raise RecordNotFound(hrn) record = records[0] + record['last_updated'] = time.gmtime() # Update_membership needs the membership lists in the existing record # filled in, so it can see if members were added or removed