Skip to content
This repository was archived by the owner on Jun 27, 2018. It is now read-only.

Commit b302f3d

Browse files
committed
fix modify() field deletion when field isn't already there
1 parent 3f38e80 commit b302f3d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pyretic/core/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ def update(self, new_dict=None, **kwargs):
7373
def remove(self, ks):
7474
d = self._dict.copy()
7575
for k in ks:
76-
del d[k]
76+
if k in d:
77+
del d[k]
7778
return self.__class__(d)
7879

7980
def pop(self, *ks):

0 commit comments

Comments
 (0)