Minor changes

This commit is contained in:
Scott Idem
2022-10-05 03:16:09 -04:00
parent 38b32ef5b1
commit 2b590b0754
2 changed files with 10 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
import datetime import datetime, time
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
from pydantic import BaseModel, EmailStr, Field from pydantic import BaseModel, EmailStr, Field
from typing import Dict, List, Optional, Set, Union from typing import Dict, List, Optional, Set, Union
@@ -255,6 +255,10 @@ async def get_event_obj(
if event_id := redis_lookup_id_random(record_id_random=event_id, table_name='event'): pass if event_id := redis_lookup_id_random(record_id_random=event_id, table_name='event'): pass
else: return mk_resp(data=None, status_code=404, response=response) else: return mk_resp(data=None, status_code=404, response=response)
# NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING
# time.sleep(2.5) # NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING
# NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING
if event_obj := load_event_obj( if event_obj := load_event_obj(
event_id = event_id, event_id = event_id,
enabled = enabled, enabled = enabled,

View File

@@ -543,26 +543,27 @@ async def get_event_session_obj(
# ### BEGIN ### API Event Session ### get_event_event_session_obj_li() ### # ### BEGIN ### API Event Session ### get_event_event_session_obj_li() ###
# Updated 2021-08-26 # Updated 2022-09-30
@router.get('/event/{event_id}/event/session/list', response_model=Resp_Body_Base) @router.get('/event/{event_id}/event/session/list', response_model=Resp_Body_Base)
async def get_event_event_session_obj_li( async def get_event_event_session_obj_li(
event_id: str = Query(..., min_length=11, max_length=22), event_id: str = Query(..., min_length=11, max_length=22),
enabled: str = 'enabled', # enabled, disabled, all enabled: str = 'enabled', # enabled, disabled, all
limit: int = 50, limit: int = 500, # For now this covers any included objects or object lists
# inc_address: bool = False, # inc_address: bool = False,
# inc_contact: bool = False, # inc_contact: bool = False,
inc_event_file_list: bool = False, inc_event_file_list: bool = False,
inc_event_file_internal_use_list: bool = False,
inc_event_presentation_list: bool = False, inc_event_presentation_list: bool = False,
inc_event_presenter_cat: bool = False, inc_event_presenter_cat: bool = False,
inc_event_presenter_list: bool = False, inc_event_presenter_list: bool = False,
inc_event_person: bool = False, # Intended for event_presenter inc_event_person: bool = False, # Intended for event_presenter
# inc_event_person_list: bool = False, # inc_event_person_list: bool = False,
inc_file_count: bool = False, # NOTE: file counts are from separate views
inc_person: bool = False, # Intended for event_presenter > event_person inc_person: bool = False, # Intended for event_presenter > event_person
inc_poc_event_person: bool = False, inc_poc_event_person: bool = False,
review: str = 'all', # ready, not_ready, all review: str = 'all', # ready, not_ready, all
approved: str = 'all', # approved, not_approved, all approved: str = 'all', # approved, not_approved, all
hidden: str = 'not_hidden', # hidden, not_hidden, all hidden: str = 'not_hidden', # hidden, not_hidden, all
inc_file_count: bool = False, # NOTE: file counts are from separate views
x_account_id: str = Header(...), x_account_id: str = Header(...),
by_alias: Optional[bool] = True, by_alias: Optional[bool] = True,
exclude_unset: Optional[bool] = True, exclude_unset: Optional[bool] = True,
@@ -594,14 +595,12 @@ async def get_event_event_session_obj_li(
inc_file_count = inc_file_count, inc_file_count = inc_file_count,
limit = limit, limit = limit,
inc_event_file_list = inc_event_file_list, inc_event_file_list = inc_event_file_list,
inc_event_file_internal_use_list = inc_event_file_internal_use_list,
inc_event_presentation_list = inc_event_presentation_list, inc_event_presentation_list = inc_event_presentation_list,
inc_event_presenter_cat = inc_event_presenter_cat, inc_event_presenter_cat = inc_event_presenter_cat,
inc_event_presenter_list = inc_event_presenter_list, inc_event_presenter_list = inc_event_presenter_list,
inc_person = inc_person, inc_person = inc_person,
inc_poc_event_person = inc_poc_event_person, inc_poc_event_person = inc_poc_event_person,
by_alias = by_alias,
exclude_unset = exclude_unset,
# model_as_dict = model_as_dict,
): ):
event_session_result_list.append(load_event_session_result) event_session_result_list.append(load_event_session_result)
else: else: