Fix minor bug with lock, change update in warning

This commit is contained in:
Zeva Rose 2022-03-25 12:40:55 -06:00
parent 3c63f26e79
commit d22e4f85a5
2 changed files with 3 additions and 1 deletions

View file

@ -23,6 +23,8 @@ async def _unlock(channel: GuildChannel, lock: Lock, logger: Logger) -> None:
await channel.delete_permission(target=overwrite, reason="Automatic unlock")
else:
logger.debug("Permission neither exists not existed")
lock.active = False
await lock.commit()
async def unlock(bot: Snake, logger: Logger) -> None:

View file

@ -12,7 +12,7 @@ from jarvis_tasks.util import runat
async def _unwarn(warn: Warning, logger: Logger) -> None:
logger.debug(f"Deactivating warning {warn.id}")
warn.update(q(active=False))
warn.active = False
await warn.commit()