Added check for remove too

This commit is contained in:
eeintech 2020-11-05 09:37:01 -05:00
parent 0b76d1d036
commit 684db67733

View File

@ -331,7 +331,8 @@ def update_group_roles(group, debug=False):
permission = get_permission_object(perm) permission = get_permission_object(perm)
group.permissions.remove(permission) if permission:
group.permissions.remove(permission)
if debug: if debug:
print(f"Removing permission {perm} from group {group.name}") print(f"Removing permission {perm} from group {group.name}")