mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
users: Minor cosmetic refactoring
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
b01ac54dd3
commit
e1e654554e
1 file changed
+5
-5
@@ -125,11 +125,11 @@ def register_group(group):
|
||||
|
||||
|
||||
def get_last_admin_user():
|
||||
""" Check if there is only one admin user
|
||||
if yes return its name else return None
|
||||
"""
|
||||
admin_users = actions.superuser_run(
|
||||
'users', ['get-group-users', 'admin']).strip().split('\n')
|
||||
"""If there is only one admin user return its name else return None."""
|
||||
output = actions.superuser_run('users', ['get-group-users', 'admin'])
|
||||
admin_users = output.strip().split('\n')
|
||||
|
||||
if len(admin_users) == 1:
|
||||
return admin_users[0]
|
||||
|
||||
return None
|
||||
Reference in new issue
Block a user