Skip to content

Commit 44c14ce

Browse files
authored
fix: don't lose fields on item update for cache (#911)
1 parent e74fe67 commit 44c14ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interactions/api/gateway/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,9 @@ def _dispatch_event(self, event: str, data: dict) -> None:
405405

406406
elif "_update" in name and hasattr(obj, "id"):
407407
old_obj = self._http.cache[model].get(id)
408-
_cache.add(obj, id)
409408
copy = model(**old_obj._json)
410409
old_obj.update(**obj._json)
410+
_cache.add(old_obj, id)
411411
self._dispatch.dispatch(
412412
f"on_{name}", copy, old_obj
413413
) # give previously stored and new one

0 commit comments

Comments
 (0)