Skip to content

Commit

Permalink
Merge pull request #161 from elliot-100/160-spondupdate_eventsuid-wil…
Browse files Browse the repository at this point in the history
…l-modify-or-overwrite-another-event-if-no-event-matching-uid-exists

Fix: Spond.update_events(uid...) will modify or overwrite another event, if no event matching uid exists bug
  • Loading branch information
elliot-100 authored Oct 21, 2024
2 parents d70399f + 7cac307 commit 997ea5e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions spond/spond.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,7 @@ async def update_event(self, uid: str, updates: JSONDict):
json results of post command
"""
if not self.events:
await self.get_events()
for event in self.events:
if event["id"] == uid:
break

event = await self._get_entity(self._EVENT, uid)
url = f"{self.api_url}sponds/{uid}"

base_event: JSONDict = {
Expand Down

0 comments on commit 997ea5e

Please sign in to comment.