Work on event related routes, methods, and models
This commit is contained in:
@@ -73,8 +73,15 @@ def load_event_obj(
|
||||
if event_id := redis_lookup_id_random(record_id_random=event_id, table_name='event'): pass
|
||||
else: return False
|
||||
|
||||
if event_rec := sql_select(table_name='v_event', record_id=event_id): pass
|
||||
else: return False
|
||||
if inc_file_count:
|
||||
log.info('Using view with file count')
|
||||
if event_rec := sql_select(table_name='v_event_w_file_count', record_id=event_id): pass
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
if event_rec := sql_select(table_name='v_event', record_id=event_id): pass
|
||||
else:
|
||||
return False
|
||||
|
||||
#log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(event_rec)
|
||||
@@ -318,7 +325,7 @@ def get_event_rec_list(
|
||||
archived: str = 'archived', # archived, not_archived, all
|
||||
conference: bool = False, # If it is a conference then organization, person, and user are queried as participants (not the owner/organizer)
|
||||
) -> list|bool:
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
if account_id or organization_id or person_id or user_id: pass
|
||||
|
||||
@@ -51,7 +51,7 @@ def load_event_presentation_obj(
|
||||
exclude_unset: bool = True,
|
||||
model_as_dict: bool = False,
|
||||
) -> Event_Presentation_Base|bool:
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
if event_presentation_id := redis_lookup_id_random(record_id_random=event_presentation_id, table_name='event_presentation'): pass
|
||||
@@ -89,7 +89,7 @@ def load_event_presentation_obj(
|
||||
|
||||
# Updated 2021-11-05
|
||||
if inc_event_file_list:
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
# log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.info('Need to include event file list...')
|
||||
|
||||
from app.methods.event_file_methods import get_event_file_rec_list, load_event_file_obj
|
||||
@@ -126,7 +126,7 @@ def load_event_presentation_obj(
|
||||
if inc_event_person_list: pass
|
||||
|
||||
if inc_event_presenter_list:
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
# log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
|
||||
data = {}
|
||||
data['event_presentation_id'] = event_presentation_id
|
||||
@@ -236,7 +236,7 @@ def get_event_presentation_rec_list(
|
||||
review: str = 'all', # ready, not_ready, all
|
||||
limit: int = 100,
|
||||
) -> list|bool:
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
if event_person_id := redis_lookup_id_random(record_id_random=event_person_id, table_name='event_person'): pass
|
||||
@@ -302,7 +302,7 @@ def get_event_presentation_rec_list(
|
||||
event_presentation_rec_li = event_presentation_rec_li_result
|
||||
else:
|
||||
event_presentation_rec_li = []
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
# log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(event_presentation_rec_li_result)
|
||||
log.debug(type(event_presentation_rec_li))
|
||||
log.debug(len(event_presentation_rec_li))
|
||||
@@ -332,9 +332,7 @@ def get_event_id_w_event_session_id(
|
||||
LIMIT 1;
|
||||
"""
|
||||
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
if event_session_data_result := sql_select(data=data, sql=sql):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(event_session_data_result)
|
||||
if event_id := event_session_data_result.get('event_id', None): return event_id
|
||||
else: return False
|
||||
|
||||
@@ -91,7 +91,7 @@ def load_event_session_obj(
|
||||
if inc_event_device_list: pass
|
||||
|
||||
if inc_event_file_list:
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
# log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.info('Need to include event file list...')
|
||||
|
||||
from app.methods.event_file_methods import get_event_file_rec_list, load_event_file_obj
|
||||
@@ -150,7 +150,7 @@ def load_event_session_obj(
|
||||
if inc_event_person_list: pass
|
||||
|
||||
if inc_event_presentation_list:
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
# log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.info('Need to include event presentation list...')
|
||||
|
||||
data = {}
|
||||
@@ -192,9 +192,7 @@ def load_event_session_obj(
|
||||
ORDER BY `event_presentation`.priority DESC, `event_presentation`.sort ASC, `event_presentation`.start_datetime ASC, `event_presentation`.sort ASC, `event_presentation`.name ASC, `event_presentation`.created_on DESC, `event_presentation`.updated_on DESC;
|
||||
"""
|
||||
|
||||
#log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
if event_presentation_rec_li_result := sql_select(data=data, sql=sql, as_list=True):
|
||||
#log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(event_presentation_rec_li_result)
|
||||
event_presentation_obj_li = []
|
||||
for event_presentation_rec in event_presentation_rec_li_result:
|
||||
@@ -229,8 +227,8 @@ def load_event_session_obj(
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
|
||||
if inc_event_presenter_cat:
|
||||
# log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.info(f'Need to get event presenter cat list for session. Event Session ID: {event_session_id}')
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
data = {}
|
||||
data['event_session_id'] = event_session_id
|
||||
|
||||
@@ -281,7 +279,7 @@ def get_event_session_rec_list(
|
||||
review: str = 'all', # ready, not_ready, all
|
||||
limit: int = 100,
|
||||
) -> list|bool:
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
if event_id := redis_lookup_id_random(record_id_random=event_id, table_name='event'): pass
|
||||
|
||||
Reference in New Issue
Block a user