Exhibitor tracking, badges, and ISHLT Impexium import related.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from __future__ import annotations
|
||||
import datetime
|
||||
import datetime, json
|
||||
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
from pydantic import BaseModel, EmailStr, Field, PrivateAttr, ValidationError, validator
|
||||
@@ -69,7 +68,7 @@ def create_event_exhibit_tracking_obj(
|
||||
|
||||
|
||||
# ### BEGIN ### API Event Exhibit Tracking Methods ### update_event_exhibit_tracking_obj() ###
|
||||
# Updated 2022-02-15
|
||||
# Updated 2023-02-08
|
||||
@logger_reset
|
||||
def update_event_exhibit_tracking_obj(
|
||||
event_exhibit_tracking_id: int,
|
||||
@@ -120,6 +119,8 @@ def update_event_exhibit_tracking_obj(
|
||||
}
|
||||
)
|
||||
|
||||
event_exhibit_tracking_dict['responses_json'] = json.dumps(event_exhibit_tracking_dict['responses_json'])
|
||||
|
||||
# ### SECTION ### Process data
|
||||
if event_exhibit_tracking_dict_up_result := sql_update(
|
||||
data = event_exhibit_tracking_dict,
|
||||
|
||||
@@ -57,7 +57,13 @@ class Event_Exhibit_Base(BaseModel):
|
||||
|
||||
staff_limit: Optional[int]
|
||||
hosted_file_limit: Optional[int]
|
||||
tablet_qty: Optional[int] # NOTE: Tablets rented by exhibitor. This should be in a separate linked table. Something like event_device
|
||||
|
||||
leads_api_access: Optional[bool] # NOTE: API access and use
|
||||
# Json type NOTE: All keys and values must be double quoted!
|
||||
# {"field_name": "The field value"}
|
||||
leads_custom_questions_json: Optional[Json] # NOTE: For now just using string instead of Json Pydantic data type. When getting the dict version for SQL this should be a string.
|
||||
leads_device_sm_qty: Optional[int] # NOTE: Cell phone sized devices rented by exhibitor. Should this be a separate linked table (event_device)?
|
||||
leads_device_lg_qty: Optional[int] # NOTE: Tablet (8 or 9 inch) sized devices rented by exhibitor. Should this be a separate linked table (event_device)?
|
||||
|
||||
enable_organization_name_change: Optional[bool]
|
||||
enable_name_change: Optional[bool]
|
||||
@@ -149,6 +155,15 @@ class Event_Exhibit_Base(BaseModel):
|
||||
return redis_lookup_id_random(record_id_random=values['person_id_random'], table_name='person')
|
||||
return None
|
||||
|
||||
# @validator('leads_custom_questions_json', always=True)
|
||||
# def leads_custom_questions_json_fix(cls, v, values, **kwargs):
|
||||
# if isinstance(v, str):
|
||||
# return json.loads(v)
|
||||
# # return v.dict()
|
||||
# else:
|
||||
# return v
|
||||
# return None
|
||||
|
||||
class Config:
|
||||
underscore_attrs_are_private = True
|
||||
allow_population_by_field_name = True
|
||||
|
||||
@@ -38,6 +38,7 @@ class Event_Exhibit_Tracking_Base(BaseModel):
|
||||
event_badge_id: Optional[int]
|
||||
|
||||
exhibitor_notes: Optional[str]
|
||||
responses_json: Optional[Json] # NOTE: Responses to custom questions
|
||||
# json_data: Optional[str]
|
||||
json_data: Optional[Json]
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ async def get_event_exhibit_obj(
|
||||
|
||||
commons: Common_Route_Params = Depends(common_route_params),
|
||||
):
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
# time.sleep(.5)
|
||||
|
||||
@@ -340,10 +340,11 @@ async def get_event_exhibit_obj_tracking_list(
|
||||
'person_family_name',
|
||||
|
||||
'person_designations',
|
||||
'person_professional_title', 'person_professional_title_override',
|
||||
'person_professional_title',
|
||||
'person_professional_title_override',
|
||||
|
||||
'person_name_override',
|
||||
'person_full_name',
|
||||
'person_full_name_override',
|
||||
|
||||
'person_affiliations',
|
||||
'person_affiliations_override',
|
||||
|
||||
Reference in New Issue
Block a user