Commit a232635b authored by Pablo Panero's avatar Pablo Panero
Browse files

Refactor. Better programming practice to return boolean

parent 1e75e6f3
......@@ -117,6 +117,4 @@ def egroup_admin():
user_provides = get_user_provides()
# set.isdisjoint() is faster than set.intersection()
admin_access_groups = admin_access_groups.split(',')
if user_provides and not set(user_provides).isdisjoint(set(admin_access_groups)):
return True
return False
return user_provides and not set(user_provides).isdisjoint(set(admin_access_groups))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment