Extracting specific bug from PR #134:
...a bug in update_events: the loop in
|
for event in self.events: |
|
if event["id"] == uid: |
|
break |
will fall through, if no event matching uid exists, and proceed to modify or overwrite whatever event was last in the loop.
Refactoring the code to use self._get_entity(self._EVENT, uid) should ensure an error is raised when the uid is not matched, and prevent any event modification.