Work on event and lookup related end points, methods, and models
This commit is contained in:
@@ -258,7 +258,7 @@ def get_event_location_rec_list(
|
||||
{sql_where_event_id}
|
||||
{sql_enabled}
|
||||
{sql_hidden}
|
||||
ORDER BY `event_location`.created_on DESC, `event_location`.updated_on DESC
|
||||
ORDER BY `event_location`.priority DESC, `event_location`.sort ASC, `event_location`.name ASC, `event_location`.created_on DESC, `event_location`.updated_on DESC
|
||||
{sql_limit};
|
||||
"""
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ from pydantic import BaseModel, EmailStr, Field, PrivateAttr, ValidationError, v
|
||||
from app.db_sql import redis_lookup_id_random, sql_insert, sql_select, sql_update
|
||||
from app.lib_general import log, logging
|
||||
|
||||
# from app.methods.event_file_methods import load_event_file_obj
|
||||
from app.methods.event_cfg_methods import load_event_cfg_obj
|
||||
from app.methods.event_person_methods import create_event_person_obj, load_event_person_obj, update_event_person_obj
|
||||
# from app.methods.person_methods import load_person_obj
|
||||
# from app.methods.user_methods import load_user_obj
|
||||
@@ -29,6 +29,7 @@ def load_event_presenter_obj(
|
||||
inc_contact: bool = False,
|
||||
inc_event_abstract_list: bool = False, # For event_presenter and using load_event_person_obj
|
||||
inc_event_badge: bool = False, # Using load_event_person_obj
|
||||
inc_event_cfg: bool = False,
|
||||
inc_event_device_list: bool = False, # For event_presenter and using load_event_person_obj
|
||||
inc_event_file_list: bool = False, # For event_presenter and using load_event_person_obj
|
||||
inc_event_person: bool = False, # Using load_event_person_obj
|
||||
@@ -83,6 +84,19 @@ def load_event_presenter_obj(
|
||||
|
||||
# if inc_event: pass
|
||||
if inc_event_abstract_list: pass
|
||||
|
||||
# Updated 2021-11-10
|
||||
if inc_event_cfg:
|
||||
log.info('Need to include event configuration...')
|
||||
if event_cfg_result := load_event_cfg_obj(
|
||||
event_id = event_id,
|
||||
by_alias = by_alias,
|
||||
exclude_unset = exclude_unset,
|
||||
model_as_dict = model_as_dict,
|
||||
):
|
||||
event_presenter_obj.event_cfg = event_cfg_result
|
||||
else: event_presenter_obj.event_cfg = None
|
||||
|
||||
if inc_event_device_list: pass
|
||||
|
||||
if inc_event_file_list:
|
||||
|
||||
Reference in New Issue
Block a user