mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 00:57:09 +01:00
Fix: prevent self-linking when bulk edit doc link (#9629)
This commit is contained in:
parent
f269919410
commit
6dea158de9
2 changed files with 35 additions and 0 deletions
|
|
@ -179,6 +179,12 @@ def modify_custom_fields(
|
|||
custom_field.data_type
|
||||
]
|
||||
defaults[value_field] = value
|
||||
if (
|
||||
custom_field.data_type == CustomField.FieldDataType.DOCUMENTLINK
|
||||
and doc_id in value
|
||||
):
|
||||
# Prevent self-linking
|
||||
continue
|
||||
CustomFieldInstance.objects.update_or_create(
|
||||
document_id=doc_id,
|
||||
field_id=field_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue