Skip to content

Commit

Permalink
Check for None when setting admin in user_modify
Browse files Browse the repository at this point in the history
api method. Fixes a bug where setting an admin-enabled user back to a normal
user is not possible (issue #100).
  • Loading branch information
JOJ0 committed Mar 8, 2023
1 parent 7492959 commit 373c804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synadm/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def user_modify(self, user_id, password, display_name, threepid,
]})
if avatar_url:
data.update({"avatar_url": avatar_url})
if admin:
if admin is not None:
data.update({"admin": admin})
if deactivation == "deactivate":
data.update({"deactivated": True})
Expand Down

0 comments on commit 373c804

Please sign in to comment.