mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-15 02:57:09 +01:00
Fix: use hard delete for custom fields with workflow removal (#10191)
This commit is contained in:
parent
cbd9823ad6
commit
60ebdc0ad6
1 changed files with 2 additions and 2 deletions
|
|
@ -1021,7 +1021,7 @@ def run_workflows(
|
||||||
|
|
||||||
if action.remove_all_custom_fields:
|
if action.remove_all_custom_fields:
|
||||||
if not use_overrides:
|
if not use_overrides:
|
||||||
CustomFieldInstance.objects.filter(document=document).delete()
|
CustomFieldInstance.objects.filter(document=document).hard_delete()
|
||||||
else:
|
else:
|
||||||
overrides.custom_fields = None
|
overrides.custom_fields = None
|
||||||
elif action.remove_custom_fields.exists():
|
elif action.remove_custom_fields.exists():
|
||||||
|
|
@ -1029,7 +1029,7 @@ def run_workflows(
|
||||||
CustomFieldInstance.objects.filter(
|
CustomFieldInstance.objects.filter(
|
||||||
field__in=action.remove_custom_fields.all(),
|
field__in=action.remove_custom_fields.all(),
|
||||||
document=document,
|
document=document,
|
||||||
).delete()
|
).hard_delete()
|
||||||
elif overrides.custom_fields:
|
elif overrides.custom_fields:
|
||||||
for field in action.remove_custom_fields.filter(
|
for field in action.remove_custom_fields.filter(
|
||||||
pk__in=overrides.custom_fields.keys(),
|
pk__in=overrides.custom_fields.keys(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue