Address critical data visibility issues for Event Files and enhance frontend documentation.
This commit resolves the persistent problem where top-level hosted file convenience fields
(e.g., , , ) were
returning as in V3 Event File API responses, even when .
Key changes include:
- Refactored Pydantic model:
- Removed redundant definitions from top-level hosted file convenience fields,
allowing direct mapping from SQL view columns.
- Simplified to focus solely on conditionally loading the nested
object, as top-level fields are now populated directly by Pydantic
from the view.
- Added comprehensive comments to clarify data flow, Pydantic's behavior, and the
expected origin of these convenience fields from SQL views.
- Updated :
- Introduced a new section detailing how to retrieve Event File data, including the
use of to get both top-level convenience fields and a nested
object.
- Clarified all ID references as random string IDs.
- Renumbered the troubleshooting section.
- Copied updated guide to .
- Continued ID Vision compliance audit, ensuring consistent handling of random string IDs
across various core and event models (Account, Address, Contact, DataStore, Event Badge Template).
- Consolidated ID Vision E2E tests and updated related documentation.
- Minor updates to and
to support Event File data retrieval with .
161 lines
7.2 KiB
Python
161 lines
7.2 KiB
Python
from app.models.event_abstract_models import *
|
|
from app.models.event_location_models import *
|
|
from app.models.event_presentation_models import *
|
|
from app.models.event_presenter_models import *
|
|
from app.models.event_session_models import *
|
|
from app.models.event_track_models import *
|
|
|
|
events_presentation_obj_li = {
|
|
'event_abstract': {
|
|
'tbl': 'event_abstract',
|
|
'tbl_default': 'v_event_abstract',
|
|
'tbl_update': 'event_abstract',
|
|
'mdl': Event_Abstract_In,
|
|
'mdl_default': Event_Abstract_In,
|
|
'mdl_in': Event_Abstract_In,
|
|
'mdl_out': Event_Abstract_In,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_event_abstract',
|
|
'tbl_name_update': 'event_abstract',
|
|
'base_name': Event_Abstract_In,
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'account_id', 'account_id_random',
|
|
'event_abstract_id_random', 'event_id_random', 'event_person_id_random',
|
|
'code', 'external_id', 'name', 'description', 'abstract', 'enable',
|
|
'hide', 'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on'
|
|
],
|
|
},
|
|
'event_location': {
|
|
'tbl': 'event_location',
|
|
'tbl_default': 'v_event_location',
|
|
'tbl_alt': 'v_event_location_w_file_count',
|
|
'tbl_update': 'event_location',
|
|
'mdl': Event_Location_Base,
|
|
'mdl_default': Event_Location_Base,
|
|
'mdl_in': Event_Location_Base,
|
|
'mdl_out': Event_Location_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_event_location',
|
|
'table_name_alt': 'v_event_location_w_file_count',
|
|
'tbl_name_update': 'event_location',
|
|
'base_name': Event_Location_Base,
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'account_id', 'account_id_random',
|
|
'event_location_id_random', 'event_id_random', 'code', 'name',
|
|
'description', 'location_type', 'internal_use', 'enable', 'hide',
|
|
'public', 'public_hide', 'hide_event_launcher', 'priority', 'sort',
|
|
'group', 'notes', 'created_on', 'updated_on'
|
|
],
|
|
},
|
|
'event_presentation': {
|
|
'tbl': 'event_presentation',
|
|
'tbl_default': 'v_event_presentation',
|
|
'tbl_alt': 'v_event_presentation_w_file_count',
|
|
'tbl_update': 'event_presentation',
|
|
'mdl': Event_Presentation_Base,
|
|
'mdl_default': Event_Presentation_Base,
|
|
'mdl_in': Event_Presentation_Base,
|
|
'mdl_out': Event_Presentation_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_event_presentation',
|
|
'table_name_alt': 'v_event_presentation_w_file_count',
|
|
'tbl_name_update': 'event_presentation',
|
|
'base_name': Event_Presentation_Base,
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'account_id', 'account_id_random',
|
|
'event_presentation_id_random', 'event_id_random',
|
|
'event_abstract_id_random', 'event_location_id_random',
|
|
'event_session_id_random', 'event_track_id_random', 'code', 'name',
|
|
'description', 'type_code', 'enable', 'hide', 'public', 'public_hide',
|
|
'hide_event_launcher', 'priority', 'sort', 'group', 'notes',
|
|
'created_on', 'updated_on', 'default_qry_str'
|
|
],
|
|
},
|
|
'event_presenter': {
|
|
'tbl': 'event_presenter',
|
|
'tbl_default': 'v_event_presenter',
|
|
'tbl_alt': 'v_event_presenter_w_file_count',
|
|
'tbl_update': 'event_presenter',
|
|
'mdl': Event_Presenter_Base,
|
|
'mdl_default': Event_Presenter_Base,
|
|
'mdl_in': Event_Presenter_Base,
|
|
'mdl_out': Event_Presenter_Out_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_event_presenter',
|
|
'table_name_alt': 'v_event_presenter_w_file_count',
|
|
'tbl_name_update': 'event_presenter',
|
|
'base_name': Event_Presenter_Base,
|
|
'exp_default': [
|
|
'event_presenter_id_random',
|
|
'title_names', 'given_name', 'middle_name', 'family_name', 'designations',
|
|
'professional_title', 'full_name',
|
|
'affiliations',
|
|
'email', 'biography',
|
|
'agree',
|
|
'comments',
|
|
'enable', 'hide', 'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on',
|
|
],
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'account_id', 'account_id_random',
|
|
'event_presenter_id_random', 'event_id_random',
|
|
'event_person_id_random', 'event_presentation_id_random',
|
|
'event_session_id_random', 'person_id_random', 'code', 'informal_name',
|
|
'given_name', 'family_name', 'full_name', 'email', 'role', 'biography', 'agree',
|
|
'event_presentation_start_datetime',
|
|
'enable',
|
|
'hide', 'public', 'public_hide', 'hide_event_launcher', 'priority',
|
|
'sort', 'group', 'notes', 'created_on', 'updated_on', 'default_qry_str'
|
|
],
|
|
},
|
|
'event_session': {
|
|
'tbl': 'event_session',
|
|
'tbl_default': 'v_event_session',
|
|
'tbl_alt': 'v_event_session_w_file_count',
|
|
'tbl_update': 'event_session',
|
|
'mdl': Event_Session_Base,
|
|
'mdl_default': Event_Session_Base,
|
|
'mdl_in': Event_Session_Base,
|
|
'mdl_out': Event_Session_Base,
|
|
'exclude_for_db': {'poc_person_id', 'file_count', 'internal_use_count', 'enable_from', 'enable_to', 'event_name', 'event_start_datetime', 'event_end_datetime', 'event_location_name', 'event_track_name', 'event_abstract_list', 'event_badge_list', 'event_device_list', 'event_file_list', 'event_file_internal_use_list', 'event_location', 'event_location_list', 'event_person_list', 'event_presenter_cat', 'event_presentation_list', 'event_presenter_list', 'event_track', 'poc_event_person'},
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_event_session',
|
|
'tbl_name_update': 'event_session',
|
|
'base_name': Event_Session_Base,
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'account_id', 'account_id_random',
|
|
'event_session_id_random', 'event_id_random',
|
|
'event_location_id_random', 'event_track_id_random', 'code', 'name',
|
|
'description', 'type_code', 'start_datetime', 'end_datetime',
|
|
'enable', 'hide', 'poc_agree', 'file_count', 'file_count_all',
|
|
'poc_person_full_name',
|
|
'public', 'public_hide', 'hide_event_launcher',
|
|
'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on',
|
|
'default_qry_str', 'event_location_name'
|
|
],
|
|
},
|
|
'event_track': {
|
|
'tbl': 'event_track',
|
|
'tbl_default': 'v_event_track',
|
|
'tbl_update': 'event_track',
|
|
'mdl': Event_Track_Base,
|
|
'mdl_default': Event_Track_Base,
|
|
# Legacy V2 keys:
|
|
'table_name': 'v_event_track',
|
|
'tbl_name_update': 'event_track',
|
|
'base_name': Event_Track_Base,
|
|
# V3 Search Security:
|
|
'searchable_fields': [
|
|
'account_id', 'account_id_random',
|
|
'event_track_id_random', 'event_id_random',
|
|
'event_location_id_random', 'name', 'description', 'track_type',
|
|
'enable', 'hide', 'poc_agree', 'file_count', 'file_count_all', 'public', 'public_hide', 'hide_event_launcher',
|
|
'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on'
|
|
],
|
|
},
|
|
}
|