Skip to content

Spond.update_events(uid...) will modify or overwrite another event, if no event matching uid exists #160

Closed
@elliot-100

Description

@elliot-100

Extracting specific bug from PR #134:

...a bug in update_events: the loop in

Spond/spond/spond.py

Lines 332 to 334 in bcb2b6d

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions