Skip to content

Commit

Permalink
Fix source fallback falling back to the dataclass
Browse files Browse the repository at this point in the history
  • Loading branch information
nexy7574 committed Nov 22, 2024
1 parent 303a796 commit cab98cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/niobot/utils/sync_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ async def insert_state_event(
try:
new_event = new_event.source["source"]
except KeyError:
new_event = new_event
new_event = new_event.source
self.log.warning(
"Event %r does not have a source key, falling back to the event itself. This may result in "
"an invalid replay.",
Expand Down Expand Up @@ -376,7 +376,7 @@ async def insert_timeline_event(
try:
new_event = new_event.source["source"]
except KeyError:
new_event = new_event
new_event = new_event.source
self.log.warning(
"Event %r does not have a source key, falling back to the event itself. This may result in "
"an invalid replay.",
Expand Down

0 comments on commit cab98cc

Please sign in to comment.