Fix mypy complaint in MatrixClient.edit_pushrule
This commit is contained in:
parent
5476cf1e6d
commit
a3206501de
|
@ -1858,7 +1858,7 @@ class MatrixClient(nio.AsyncClient):
|
|||
|
||||
if enable is not None and (old.enabled if old else True) != enable:
|
||||
await self.enable_pushrule("global", kind, rule_id, enable)
|
||||
elif kind_change or rule_id_change and not old.enabled:
|
||||
elif kind_change or rule_id_change and old and not old.enabled:
|
||||
await self.enable_pushrule("global", kind, rule_id, False)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user