2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 12:05:53 +00:00

remove unneeded branches

fixes SIM102
This commit is contained in:
Matthias Mair
2024-08-20 01:17:35 +02:00
parent 372e3d417e
commit f74d41bc07
24 changed files with 289 additions and 258 deletions

View File

@ -628,9 +628,11 @@ def export_records(
model_name = entry.get('model', None)
# Ignore any temporary settings (start with underscore)
if model_name in ['common.inventreesetting', 'common.inventreeusersetting']:
if entry['fields'].get('key', '').startswith('_'):
continue
if model_name in [
'common.inventreesetting',
'common.inventreeusersetting',
] and entry['fields'].get('key', '').startswith('_'):
continue
if model_name == 'auth.group':
entry['fields']['permissions'] = []