Skip to content

Commit

Permalink
Refactor Spond.update_event() to use common _get_entity()
Browse files Browse the repository at this point in the history
  • Loading branch information
elliot-100 committed Oct 21, 2024
1 parent d70399f commit 7cac307
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 7cac307

Please sign in to comment.