Minor changes
This commit is contained in:
@@ -36,6 +36,7 @@ def load_event_location_obj(
|
||||
enabled: str = 'enabled', # enabled, disabled, all
|
||||
hidden: str = 'hidden', # hidden, not_hidden, all
|
||||
limit: int = 1000,
|
||||
offset: int = 0,
|
||||
by_alias: bool = True,
|
||||
exclude_unset: bool = True,
|
||||
model_as_dict: bool = False,
|
||||
@@ -70,7 +71,34 @@ def load_event_location_obj(
|
||||
#account_id = event_location_rec.get('account_id', None)
|
||||
event_id = event_location_rec.get('event_id', None)
|
||||
|
||||
# if inc_event_device_list: pass
|
||||
# Updated 2022-09-27
|
||||
if inc_event_device_list:
|
||||
log.info('Need to include event device list...')
|
||||
|
||||
from app.methods.event_device_methods import get_event_device_rec_list, load_event_device_obj
|
||||
if event_device_rec_list_result := get_event_device_rec_list(
|
||||
for_type = 'event_location',
|
||||
for_id = event_location_id,
|
||||
enabled = enabled,
|
||||
limit = limit,
|
||||
offset = offset,
|
||||
):
|
||||
event_device_result_list = []
|
||||
for event_device_rec in event_device_rec_list_result:
|
||||
if load_event_device_result := load_event_device_obj(
|
||||
event_device_id = event_device_rec.get('event_device_id', None),
|
||||
enabled = enabled,
|
||||
):
|
||||
event_device_result_list.append(load_event_device_result)
|
||||
else:
|
||||
event_device_result_list.append(None)
|
||||
log.debug(event_device_result_list)
|
||||
event_location_obj.event_device_list = event_device_result_list
|
||||
elif isinstance(event_device_rec_list_result, list):
|
||||
event_location_obj.event_device_list = []
|
||||
else:
|
||||
event_location_obj.event_device_list = None
|
||||
|
||||
# if inc_event_file_list: pass
|
||||
|
||||
# Updated 2021-10-21
|
||||
@@ -244,6 +272,7 @@ def get_event_location_rec_list(
|
||||
enabled: str = 'enabled', # enabled, disabled, all
|
||||
hidden: str = 'not_hidden', # hidden, not_hidden, all
|
||||
limit: int = 100,
|
||||
offset: int = 0,
|
||||
) -> list|bool:
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
@@ -214,7 +214,6 @@ def load_event_obj(
|
||||
if event_device_rec_list_result := get_event_device_rec_list(
|
||||
for_type = 'event',
|
||||
for_id = event_id,
|
||||
# event_id = event_id,
|
||||
enabled = enabled,
|
||||
):
|
||||
event_device_result_list = []
|
||||
@@ -311,10 +310,12 @@ def load_event_obj(
|
||||
if load_event_location_result := load_event_location_obj(
|
||||
event_location_id = event_location_rec.get('event_location_id', None),
|
||||
enabled = enabled,
|
||||
inc_event_device_list = inc_event_device_list,
|
||||
inc_event_file_list = inc_event_file_list,
|
||||
inc_event_presentation_list = inc_event_presentation_list,
|
||||
inc_event_presenter_list = inc_event_presenter_list,
|
||||
inc_event_session_list = inc_event_session_list,
|
||||
inc_file_count = inc_file_count,
|
||||
limit = limit,
|
||||
by_alias = by_alias,
|
||||
exclude_unset = exclude_unset,
|
||||
@@ -360,6 +361,7 @@ def load_event_obj(
|
||||
inc_event_presentation_list = inc_event_presentation_list,
|
||||
inc_event_presenter_cat = inc_event_presenter_cat,
|
||||
inc_event_presenter_list = inc_event_presenter_list,
|
||||
inc_file_count = inc_file_count,
|
||||
inc_person = inc_person,
|
||||
inc_poc_event_person = inc_poc_event_person,
|
||||
by_alias = by_alias,
|
||||
|
||||
@@ -47,6 +47,7 @@ def load_event_presentation_obj(
|
||||
inc_person: bool = False,
|
||||
inc_user: bool = False,
|
||||
limit: int = 1000,
|
||||
offset: int = 0,
|
||||
by_alias: bool = True,
|
||||
exclude_unset: bool = True,
|
||||
model_as_dict: bool = False,
|
||||
@@ -238,6 +239,7 @@ def get_event_presentation_rec_list(
|
||||
hidden: str = 'not_hidden', # hidden, not_hidden, all
|
||||
review: str = 'all', # ready, not_ready, all
|
||||
limit: int = 100,
|
||||
offset: int = 0,
|
||||
) -> list|bool:
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
@@ -41,6 +41,7 @@ def load_event_presenter_obj(
|
||||
inc_person: bool = False, # Using load_event_person_obj
|
||||
inc_user: bool = False, # Using load_event_person_obj
|
||||
limit: int = 1000,
|
||||
offset: int = 0,
|
||||
by_alias: bool = True,
|
||||
exclude_unset: bool = False,
|
||||
model_as_dict: bool = False,
|
||||
@@ -208,6 +209,7 @@ def get_event_presenter_rec_list(
|
||||
hidden: str = 'not_hidden', # hidden, not_hidden, all
|
||||
enabled: str = 'enabled', # enabled, disabled, all
|
||||
limit: int = 100,
|
||||
offset: int = 0,
|
||||
) -> list|bool:
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
@@ -52,6 +52,7 @@ def load_event_session_obj(
|
||||
inc_person: bool = False,
|
||||
inc_user: bool = False,
|
||||
limit: int = 1000,
|
||||
offset: int = 0,
|
||||
by_alias: bool = True,
|
||||
exclude_unset: bool = True,
|
||||
model_as_dict: bool = False,
|
||||
@@ -328,6 +329,7 @@ def get_event_session_rec_list(
|
||||
hidden: str = 'not_hidden', # hidden, not_hidden, all
|
||||
review: str = 'all', # ready, not_ready, all
|
||||
limit: int = 100,
|
||||
offset: int = 0,
|
||||
) -> list|bool:
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
Reference in New Issue
Block a user