mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Refactor HistoryManager in aiogram/fsm/scene.py
Removed condition that checked if 'history' is empty before calling 'update_data' in 'Scene'.
This commit is contained in:
parent
decd5e4ac2
commit
dddc884589
1 changed files with 1 additions and 4 deletions
|
|
@ -38,10 +38,7 @@ class HistoryManager:
|
|||
history = history[-self._size :]
|
||||
loggers.scene.debug("Push state=%s data=%s to history", state, data)
|
||||
|
||||
if not history:
|
||||
await self._history_state.set_data({})
|
||||
else:
|
||||
await self._history_state.update_data(history=history)
|
||||
await self._history_state.update_data(history=history)
|
||||
|
||||
async def pop(self) -> Optional[MemoryStorageRecord]:
|
||||
history_data = await self._history_state.get_data()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue