Skip to content
Snippets Groups Projects
Commit 3a3594db authored by Julian's avatar Julian
Browse files

Fixed that attrdel raises ValueErrors for values that are not present

parent d0fd1d23
No related branches found
No related tags found
No related merge requests found
......@@ -93,7 +93,8 @@ class ModifyOperation:
obj_state.attributes[attr] += values
elif action == MODIFY_DELETE:
for value in values:
obj_state.attributes[attr].remove(value)
if value in obj_state.attributes[attr]:
obj_state.attributes[attr].remove(value)
def apply_session(self, session_state):
for attr, changes in self.changes.items():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment