mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 19:15:41 +00:00
fix(backend): record export is empty when include permissions flag is used (#9704)
This commit is contained in:
2
tasks.py
2
tasks.py
@ -876,7 +876,6 @@ def export_records(
|
|||||||
|
|
||||||
data_out = []
|
data_out = []
|
||||||
|
|
||||||
if include_permissions is False:
|
|
||||||
for entry in data:
|
for entry in data:
|
||||||
model_name = entry.get('model', None)
|
model_name = entry.get('model', None)
|
||||||
|
|
||||||
@ -885,6 +884,7 @@ def export_records(
|
|||||||
if entry['fields'].get('key', '').startswith('_'):
|
if entry['fields'].get('key', '').startswith('_'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if include_permissions is False:
|
||||||
if model_name == 'auth.group':
|
if model_name == 'auth.group':
|
||||||
entry['fields']['permissions'] = []
|
entry['fields']['permissions'] = []
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user