fix Dispatcher.release_key (#908)

del bucker['key'] raises KeyError: 'key'
This commit is contained in:
Alex Filiov 2022-05-14 23:01:32 +09:00 committed by GitHub
parent bad6d8613a
commit 8d58ed909d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1367,7 +1367,7 @@ class Dispatcher(DataMixin, ContextInstanceMixin):
bucket = await self.storage.get_bucket(chat=chat_id, user=user_id)
if bucket and key in bucket:
del bucket['key']
del bucket[key]
await self.storage.set_bucket(chat=chat_id, user=user_id, bucket=bucket)
return True
return False