Fix: reject over-long text zone values instead of truncating

A truncated URL is a different URL. Let field validation reject string and URL
values that are too long.
This commit is contained in:
stumpylog committed 2026-11-19 08:10:35 -08:00
1 parent 7b25551e1e
commit fcc465ec2e
2 files changed
+64 -21

No files matched your search

+3 -3
View File
@@ -991,10 +991,10 @@ def _convert_value(
if data_type in (
CustomField.FieldDataType.STRING,
CustomField.FieldDataType.URL,
CustomField.FieldDataType.LONG_TEXT,
):
return value[:128]
elif data_type == CustomField.FieldDataType.LONG_TEXT:
# Returned whole; _prepare_field_update validates length and URL
# format, so a value is rejected rather than truncated.
return value
elif data_type == CustomField.FieldDataType.INT: