Fix minor bug with lock, change update in warning
This commit is contained in:
parent
3c63f26e79
commit
d22e4f85a5
2 changed files with 3 additions and 1 deletions
|
@ -23,6 +23,8 @@ async def _unlock(channel: GuildChannel, lock: Lock, logger: Logger) -> None:
|
||||||
await channel.delete_permission(target=overwrite, reason="Automatic unlock")
|
await channel.delete_permission(target=overwrite, reason="Automatic unlock")
|
||||||
else:
|
else:
|
||||||
logger.debug("Permission neither exists not existed")
|
logger.debug("Permission neither exists not existed")
|
||||||
|
lock.active = False
|
||||||
|
await lock.commit()
|
||||||
|
|
||||||
|
|
||||||
async def unlock(bot: Snake, logger: Logger) -> None:
|
async def unlock(bot: Snake, logger: Logger) -> None:
|
||||||
|
|
|
@ -12,7 +12,7 @@ from jarvis_tasks.util import runat
|
||||||
|
|
||||||
async def _unwarn(warn: Warning, logger: Logger) -> None:
|
async def _unwarn(warn: Warning, logger: Logger) -> None:
|
||||||
logger.debug(f"Deactivating warning {warn.id}")
|
logger.debug(f"Deactivating warning {warn.id}")
|
||||||
warn.update(q(active=False))
|
warn.active = False
|
||||||
await warn.commit()
|
await warn.commit()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue