filter must be converted to list

This commit is contained in:
Egor Guslyancev 2023-12-18 09:50:25 -03:00
parent f258e4c744
commit 569c2aa752
GPG Key ID: D7E709AA465A55F9
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -1395,7 +1395,7 @@ def stack_update(forum: int, force_reset: bool = False) -> None:
def clean_old_dates(date: dt.datetime, array: str) -> None:
"Removes dates from db's array which are older than `date`."
a = db.read(array)
a = filter(lambda x: x >= date, a)
a = list(filter(lambda x: x >= date, a))
db.write(array, a)