Skip to content

Commit 997ea5e

Browse files
authoredOct 21, 2024
Merge pull request #161 from elliot-100/160-spondupdate_eventsuid-will-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
2 parents d70399f + 7cac307 commit 997ea5e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed
 

‎spond/spond.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,7 @@ async def update_event(self, uid: str, updates: JSONDict):
350350
json results of post command
351351
352352
"""
353-
if not self.events:
354-
await self.get_events()
355-
for event in self.events:
356-
if event["id"] == uid:
357-
break
358-
353+
event = await self._get_entity(self._EVENT, uid)
359354
url = f"{self.api_url}sponds/{uid}"
360355

361356
base_event: JSONDict = {

0 commit comments

Comments
 (0)