mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Check if permission is not NoneType before adding to group
This commit is contained in:
parent
15ea73a448
commit
0b76d1d036
@ -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}")
|
||||
|
Loading…
Reference in New Issue
Block a user