fix for state schema mismatch
This commit is contained in:
parent
d44a684b37
commit
eb23c0e079
@ -3349,11 +3349,12 @@ class StateManagerRedis(StateManager):
|
|||||||
The values.
|
The values.
|
||||||
"""
|
"""
|
||||||
d = {}
|
d = {}
|
||||||
for state in await self.redis.hmget(name=name, keys=keys): # type: ignore
|
for redis_state in await self.redis.hmget(name=name, keys=keys): # type: ignore
|
||||||
key = keys.pop(0)
|
key = keys.pop(0)
|
||||||
if state is not None:
|
state = None
|
||||||
|
if redis_state is not None:
|
||||||
with contextlib.suppress(StateSchemaMismatchError):
|
with contextlib.suppress(StateSchemaMismatchError):
|
||||||
state = BaseState._deserialize(data=state)
|
state = BaseState._deserialize(data=redis_state)
|
||||||
if state is None:
|
if state is None:
|
||||||
state_cls = self.state.get_class_substate(key)
|
state_cls = self.state.get_class_substate(key)
|
||||||
state = state_cls(
|
state = state_cls(
|
||||||
|
Loading…
Reference in New Issue
Block a user