Skip to content

Commit 8b0bda5

Browse files
committed
Fixes on propagate
1 parent c3e2665 commit 8b0bda5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

netpyne_ui/netpyne_geppetto.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ def propagate(self, model, label, cond, new, old):
966966
for plot in analysis.keys():
967967
if cond in analysis[plot].keys():
968968
for index, item in enumerate(analysis[plot][cond]):
969-
if isinstance(item, str):
969+
if isinstance(item, str) or isinstance(item, int):
970970
if item == old:
971971
if new == None:
972972
analysis[plot][cond].remove(item)
@@ -984,11 +984,11 @@ def propagate(self, model, label, cond, new, old):
984984
else:
985985
obj = getattr(self.netParams, model)
986986
for key in obj.keys():
987-
if label in list(obj[key][cond].keys()):
987+
if cond in obj[key] and label in list(obj[key][cond].keys()):
988988
if isinstance(obj[key][cond][label], str):
989989
if old == obj[key][cond][label]:
990990
if new == '' or new == None:
991-
obj[key].pop(label)
991+
obj[key][cond].pop(label)
992992
else:
993993
obj[key][cond][label] = new
994994
elif isinstance(obj[key][cond][label], list):

0 commit comments

Comments
 (0)