diff --git a/aiogram/dispatcher/fsm/storage/redis.py b/aiogram/dispatcher/fsm/storage/redis.py index c5ea89ef..105a9b37 100644 --- a/aiogram/dispatcher/fsm/storage/redis.py +++ b/aiogram/dispatcher/fsm/storage/redis.py @@ -145,8 +145,8 @@ class RedisStorage(BaseStorage): else: await self.redis.set( redis_key, - state.state if isinstance(state, State) else state, # type: ignore[arg-type] - ex=self.state_ttl, # type: ignore[arg-type] + cast(str, state.state if isinstance(state, State) else state), + ex=self.state_ttl, # type: ignore[arg-type] # NOQA ) async def get_state(