mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Prevent auto-update of group permissions during loaddata stage
This commit is contained in:
parent
4f9898fba5
commit
2d7bff0773
@ -13,6 +13,7 @@ from django.dispatch import receiver
|
||||
from django.db.models.signals import post_save, post_delete
|
||||
|
||||
import logging
|
||||
import sys
|
||||
|
||||
|
||||
logger = logging.getLogger("inventree")
|
||||
@ -270,6 +271,14 @@ def update_group_roles(group, debug=False):
|
||||
|
||||
"""
|
||||
|
||||
if 'loaddata' in sys.argv:
|
||||
"""
|
||||
In the case that we are importing records,
|
||||
*do not* update group roles:
|
||||
This will cause conflicts in the database!
|
||||
"""
|
||||
return
|
||||
|
||||
# List of permissions already associated with this group
|
||||
group_permissions = set()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user