about summary refs log tree commit diff
path: root/gn_auth/auth
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/auth')
-rw-r--r--gn_auth/auth/authorisation/users/views.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/gn_auth/auth/authorisation/users/views.py b/gn_auth/auth/authorisation/users/views.py
index 55921ca..2ad672d 100644
--- a/gn_auth/auth/authorisation/users/views.py
+++ b/gn_auth/auth/authorisation/users/views.py
@@ -335,15 +335,17 @@ def user_join_request_exists():
 @require_oauth("profile user")
 def list_all_users() -> Response:
     """List all the users."""
-    _kwargs = {
-        key: value
-        for key, value in (
-                request.json.items() if request.json
-                else {
-                        "email": "", "name": "", "verified": "", "age": ""
-                })
-        if key in ("email", "name", "verified", "age")
-    }
+    _kwargs = (
+        {
+            key: value
+            for key, value in request_json().items()
+            if key in ("email", "name", "verified", "age")
+        }
+        or
+        {
+            "email": "", "name": "", "verified": "", "age": ""
+        }
+    )
 
     with (require_oauth.acquire("profile group") as _the_token,
           db.connection(current_app.config["AUTH_DB"]) as conn,