Deactivate lock regardless of error
This commit is contained in:
parent
7dcfd1aaf7
commit
4a69655bfb
1 changed files with 1 additions and 1 deletions
|
@ -27,9 +27,9 @@ 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
|
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.debug("Locked channel deleted, ignoring error")
|
logger.debug("Locked channel deleted, ignoring error")
|
||||||
|
lock.active = False
|
||||||
await lock.commit()
|
await lock.commit()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue