From 6e827507f7bbdfeb614c9f076842f726fb9ac0e3 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Tue, 20 Aug 2019 10:29:36 +0100 Subject: [PATCH] Return empty object on success rather than null. Signed-off-by: Olivier Wilkinson (reivilibre) --- synapse/rest/admin/users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py index 8115f2445e..b0fddb6898 100644 --- a/synapse/rest/admin/users.py +++ b/synapse/rest/admin/users.py @@ -69,8 +69,8 @@ class UserAdminServlet(RestServlet): if target_user == auth_user and not set_admin_to: raise SynapseError(400, "You may not demote yourself.") - ret = yield self.handlers.admin_handler.set_user_server_admin( + yield self.handlers.admin_handler.set_user_server_admin( target_user, set_admin_to ) - return (200, ret) + return (200, {})