fix: Resolve ID Vision conflicts and validation errors in Event Exhibit Tracking

- Modified 'sanitize_payload' to ignore 'external_person_id', preventing incorrect lookup attempts for email/passcode fields.
- Refined 'Event_Exhibit_Tracking_Base' to allow 'Union[int, str]' for relational IDs, bypassing string-length validation for internal integers.
- Adjusted root validator to preserve relational integers during POST/PUT operations while still stripping primary/account IDs for Vision-compliant READ views.
- Aligned model configuration with other V3 objects for consistency.
This commit is contained in:
Scott Idem
2026-03-03 17:08:34 -05:00
parent 403b543ed2
commit 89e12b9f97
2 changed files with 28 additions and 48 deletions

View File

@@ -212,6 +212,8 @@ def sanitize_payload(data: dict, model: Any, ignore_extra: bool = False) -> None
# Scenario B: Vision naming (e.g., account_id: "abc")
# We only resolve if it's a string of the correct length (random ID format)
elif k.endswith('_id') and 11 <= len(v) <= 22:
if k == 'external_person_id':
continue
target_id_field = k
obj_type_lookup = k.replace('_id', '')