Fix mypy complaint in MatrixClient.edit_pushrule

This commit is contained in:
miruka 2021-03-02 08:07:50 -04:00
parent 5476cf1e6d
commit a3206501de

View File

@ -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)