From: Tony Mack Date: Tue, 16 Jun 2009 18:04:23 +0000 (+0000) Subject: fix bug in update_membership_list, oldRecord might be None X-Git-Tag: sfa-0.9-0@14641~264 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=105c9b6bc912283b686f224428991056666656ba;p=sfa.git fix bug in update_membership_list, oldRecord might be None --- diff --git a/geni/util/api.py b/geni/util/api.py index 08e1134e..2774f805 100644 --- a/geni/util/api.py +++ b/geni/util/api.py @@ -401,7 +401,10 @@ class GeniAPI: def update_membership_list(self, oldRecord, record, listName, addFunc, delFunc): # get a list of the HRNs tht are members of the old and new records - oldList = oldRecord.get(listName, []) + if oldRecord: + oldList = oldRecord.get(listName, []) + else: + oldList = [] newList = record.get(listName, []) # if the lists are the same, then we don't have to update anything