mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-21 04:52:40 +00:00
Chore: log a warning when a zone title is cut to 128 characters
This commit is contained in:
1 parent
a7d4c04a4b
commit
d6ae3e1ec6
2 files changed
+41
No files matched your search
@@ -1078,6 +1078,12 @@ def _prepare_field_update(
|
||||
)
|
||||
model = CustomFieldInstance
|
||||
case OcrTemplateZone.TargetType.TITLE:
|
||||
if len(value) > 128:
|
||||
logger.warning(
|
||||
"Zone OCR: title from zone '%s' is %d characters, keeping the first 128",
|
||||
zone.name,
|
||||
len(value),
|
||||
)
|
||||
field_name, typed_value = "title", value[:128]
|
||||
model = Document
|
||||
case OcrTemplateZone.TargetType.ASN:
|
||||
|
||||
Reference in new issue
Block a user