2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-26 08:40:52 +00:00

Add fixture for users / groups

This commit is contained in:
Oliver Walters
2021-04-25 11:41:48 +10:00
parent e13850515d
commit f766711838
2 changed files with 58 additions and 0 deletions
InvenTree/users/fixtures
tasks.py

@ -286,6 +286,8 @@ def export_records(c, filename='data.json'):
# Dump data to temporary file
manage(c, cmd, pty=True)
print("Running data post-processing step...")
# Post-process the file, to remove any "permissions" specified for a group
with open(tmpfile, "r") as f_in:
data = json.loads(f_in.read())
@ -365,6 +367,9 @@ def import_fixtures(c):
'location',
'stock_tests',
'stock',
# Users
'users'
]
command = 'loaddata ' + ' '.join(fixtures)