docs: add critical reminder comments for searchable_fields and ID resolution

This commit is contained in:
Scott Idem
2026-02-03 14:52:32 -05:00
parent 03154ab95b
commit 5eaae99702
2 changed files with 6 additions and 0 deletions

View File

@@ -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)

View File

@@ -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')