Code clean up. Better debugging. Work on event session, presentation, and presenter.
This commit is contained in:
@@ -174,25 +174,25 @@ async def get_event_obj_li(
|
||||
for event_obj in event_obj_li_result:
|
||||
event_id = event_obj.get('event_id', None)
|
||||
if event_obj := load_event_obj(
|
||||
event_id=event_id,
|
||||
enabled=enabled,
|
||||
inc_event_abstract_list=inc_event_abstract_list,
|
||||
inc_event_badge_list=inc_event_badge_list,
|
||||
inc_event_device_list=inc_event_device_list,
|
||||
inc_event_exhibit_list=inc_event_exhibit_list,
|
||||
inc_event_file_list=inc_event_file_list,
|
||||
inc_event_location_list=inc_event_location_list,
|
||||
inc_event_person_list=inc_event_person_list,
|
||||
inc_event_presentation_list=inc_event_presentation_list,
|
||||
inc_event_presenter_list=inc_event_presenter_list,
|
||||
inc_event_registration_list=inc_event_registration_list,
|
||||
inc_event_session_list=inc_event_session_list,
|
||||
inc_event_track_list=inc_event_track_list,
|
||||
inc_event_cfg=inc_event_cfg,
|
||||
inc_event_registration_cfg=inc_event_registration_cfg,
|
||||
inc_poc_event_person=inc_poc_event_person,
|
||||
# inc_poc_person=inc_poc_person,
|
||||
inc_user=inc_user,
|
||||
event_id = event_id,
|
||||
enabled = enabled,
|
||||
inc_event_abstract_list = inc_event_abstract_list,
|
||||
inc_event_badge_list = inc_event_badge_list,
|
||||
inc_event_device_list = inc_event_device_list,
|
||||
inc_event_exhibit_list = inc_event_exhibit_list,
|
||||
inc_event_file_list = inc_event_file_list,
|
||||
inc_event_location_list = inc_event_location_list,
|
||||
inc_event_person_list = inc_event_person_list,
|
||||
inc_event_presentation_list = inc_event_presentation_list,
|
||||
inc_event_presenter_list = inc_event_presenter_list,
|
||||
inc_event_registration_list = inc_event_registration_list,
|
||||
inc_event_session_list = inc_event_session_list,
|
||||
inc_event_track_list = inc_event_track_list,
|
||||
inc_event_cfg = inc_event_cfg,
|
||||
inc_event_registration_cfg = inc_event_registration_cfg,
|
||||
inc_poc_event_person = inc_poc_event_person,
|
||||
# inc_poc_person = inc_poc_person,
|
||||
inc_user = inc_user,
|
||||
):
|
||||
|
||||
data = event_obj.dict(by_alias=by_alias, exclude_unset=exclude_unset) # pylint: disable=no-member
|
||||
@@ -209,8 +209,10 @@ async def get_event_obj_li(
|
||||
@router.get('/event/{event_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_obj(
|
||||
event_id: str = Query(..., min_length=1, max_length=22),
|
||||
enabled: str = 'enabled', # For now this covers any included objects or object lists
|
||||
limit: int = 500, # For now this covers any included objects or object lists
|
||||
enabled: str = 'enabled', # enabled, disabled, all
|
||||
approved: str = 'all', # approve(d), not_approved, all
|
||||
hidden: str = 'not_hidden', # hidden, not_hidden, all
|
||||
review: str = 'all', # ready, not_ready, all
|
||||
inc_address: bool = False, # Under event and under contact
|
||||
# inc_address_location: bool = False,
|
||||
inc_contact: bool = False,
|
||||
@@ -241,11 +243,12 @@ async def get_event_obj(
|
||||
inc_product_list: bool = False,
|
||||
inc_user: bool = False,
|
||||
x_account_id: str = Header(...),
|
||||
limit: int = 500, # For now this covers any included objects or object lists
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
response: Response = Response,
|
||||
):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.DEBUG) # 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
|
||||
@@ -254,11 +257,10 @@ async def get_event_obj(
|
||||
|
||||
if event_obj := load_event_obj(
|
||||
event_id = event_id,
|
||||
limit = limit,
|
||||
by_alias = by_alias,
|
||||
exclude_unset = exclude_unset,
|
||||
# model_as_dict = model_as_dict,
|
||||
enabled = enabled,
|
||||
approved = approved,
|
||||
hidden = hidden,
|
||||
review = review,
|
||||
inc_address = inc_address,
|
||||
# inc_address_location = inc_address_location,
|
||||
inc_contact = inc_contact,
|
||||
@@ -287,6 +289,10 @@ async def get_event_obj(
|
||||
# inc_product = inc_product,
|
||||
# inc_product_list = inc_product_list,
|
||||
inc_user = inc_user,
|
||||
limit = limit,
|
||||
by_alias = by_alias,
|
||||
exclude_unset = exclude_unset,
|
||||
# model_as_dict = model_as_dict,
|
||||
):
|
||||
# event_dict = event_obj.dict(by_alias=by_alias, exclude_unset=exclude_unset)
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user