mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-18 16:06:58 +00:00
Check if permission is not NoneType before adding to group
This commit is contained in:
1 parent
15ea73a448
commit
0b76d1d036
1 file changed
+2
-1
@@ -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}")
|
||||
|
||||
Reference in new issue
Block a user