Updates related to abstracts
This commit is contained in:
@@ -11,6 +11,7 @@ from app.methods.event_person_methods import load_event_person_obj
|
||||
|
||||
from app.models.common_field_schema import default_num_bytes
|
||||
from app.models.event_abstract_models import Event_Abstract_Ext, Event_Abstract_In
|
||||
from app.methods.event_cfg_methods import load_event_cfg_obj
|
||||
|
||||
|
||||
# ### BEGIN ### API Event Abstract Methods ### load_event_abstract_obj() ###
|
||||
@@ -24,6 +25,7 @@ def load_event_abstract_obj(
|
||||
hidden: str = 'not_hidden', # hidden, not_hidden, all
|
||||
review: str = 'all', # ready, not_ready, all
|
||||
|
||||
inc_event_cfg: bool = False,
|
||||
inc_event_file_list: bool = False,
|
||||
inc_event_person: bool = False,
|
||||
inc_event_person_profile: bool = False,
|
||||
@@ -53,6 +55,19 @@ def load_event_abstract_obj(
|
||||
log.error(e.json())
|
||||
return False
|
||||
|
||||
# Updated 2023-06-28
|
||||
if inc_event_cfg:
|
||||
log.info('Need to include event configuration...')
|
||||
if event_cfg_result := load_event_cfg_obj(
|
||||
event_id = event_abstract_obj.event_id,
|
||||
by_alias = by_alias,
|
||||
exclude_unset = exclude_unset,
|
||||
model_as_dict = model_as_dict,
|
||||
):
|
||||
event_abstract_obj.event_cfg = event_cfg_result
|
||||
else: event_abstract_obj.event_cfg = {} # None
|
||||
log.debug(event_abstract_obj.event_cfg)
|
||||
|
||||
# Updated 2023-03-20
|
||||
if inc_event_file_list:
|
||||
# log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
|
||||
Reference in New Issue
Block a user