Check if permission is not NoneType before adding to group

This commit is contained in:
eeintech 2020-11-05 09:34:18 -05:00
parent 15ea73a448
commit 0b76d1d036

View File

@ -316,7 +316,8 @@ def update_group_roles(group, debug=False):
permission = get_permission_object(perm)
group.permissions.add(permission)
if permission:
group.permissions.add(permission)
if debug:
print(f"Adding permission {perm} to group {group.name}")