S4: Divider/UPS charts send null for irrelevant fields #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Code Smell
File:
web/components/ChartEditor.tsxWhen
chartType === dividerorchartType === ups, the form still sends these fields as null in the POST body:order_by,series_limit,y_min,y_max,y_scale,filter_combinators,filter_items,filter_items_excludeFor divider charts, all 8 fields are null. The POST handler inserts them as nullable columns. The PUT handler ignores them via
COALESCE.Why it matters
For every divider chart creation, the HTTP request payload carries ~200 bytes of null fields. While harmless functionally, its noisy in API logs and suggests the form doesnt understand its own domain.
Suggestion
Conditionally omit fields based on
chartTypeinhandleSave(). Or split the schema — but thats higher effort.