From 5eaae99702015609232d75c0936912e0046c1d96 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Tue, 3 Feb 2026 14:52:32 -0500 Subject: [PATCH] docs: add critical reminder comments for searchable_fields and ID resolution --- app/ae_obj_types_def.py | 4 ++++ app/routers/api_v3_actions_hosted_file.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/app/ae_obj_types_def.py b/app/ae_obj_types_def.py index 019934f..8e43821 100644 --- a/app/ae_obj_types_def.py +++ b/app/ae_obj_types_def.py @@ -2,6 +2,10 @@ This file centralizes the object type definitions for the Aether API. It merges definitions from modular files in app/object_definitions/ to support both V2 (legacy) and V3 CRUD operations. + +🛑 REMINDER: Any field added to 'searchable_fields' in modular definitions +MUST also exist in the corresponding Pydantic model (mdl) and SQL View (tbl) +to prevent serialization errors during V3 Search operations. """ # Restore blanket imports for legacy compatibility (V1 and V2 rely on these) diff --git a/app/routers/api_v3_actions_hosted_file.py b/app/routers/api_v3_actions_hosted_file.py index c3e6737..cf2ca35 100644 --- a/app/routers/api_v3_actions_hosted_file.py +++ b/app/routers/api_v3_actions_hosted_file.py @@ -210,6 +210,8 @@ async def download_file_action( # 2. Resolve File Record # ID Vision: Attempt to resolve the ID. + # 🛑 REMINDER: If adding a new specialized 'container' object (like event_person_profile), + # ensure the lookup logic is mirrored here to allow direct downloads via container ID. # If not found in hosted_file, check if it's an event_file or archive_content ID that we can resolve. resolved_id = redis_lookup_id_random(record_id_random=hosted_file_id, table_name='hosted_file')