From 105c9b6bc912283b686f224428991056666656ba Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Tue, 16 Jun 2009 18:04:23 +0000 Subject: [PATCH] fix bug in update_membership_list, oldRecord might be None --- geni/util/api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.47.0