Skip to content

Commit

Permalink
Update dapr/actor/runtime/mock_state_manager.py
Browse files Browse the repository at this point in the history
Fixing bug in try_add_state as mentioned in PR dapr#756

Co-authored-by: Elena Kolevska <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
Signed-off-by: Lorenzo Curcio <[email protected]>
  • Loading branch information
2 people authored and Lorenzo Curcio committed Dec 3, 2024
1 parent cc6ee78 commit 6cebadd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dapr/actor/runtime/mock_state_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def try_add_state(self, state_name: str, value: T) -> bool:
return True
return False
existed = state_name in self._mock_state
if not existed:
if existed:
return False
self._default_state_change_tracker[state_name] = StateMetadata(value, StateChangeKind.add)
self._mock_state[state_name] = value
Expand Down

0 comments on commit 6cebadd

Please sign in to comment.