Sort of bug fix for abstracts and updating the abstract code
This commit is contained in:
@@ -198,6 +198,8 @@ class Event_Abstract_Base_New(Core_Std_Obj_Base):
|
||||
|
||||
# poc_event_person_id_random: Optional[str] # Maybe change this to primary_event_person?
|
||||
|
||||
code: Optional[str]
|
||||
|
||||
external_id: Optional[str]
|
||||
|
||||
# type_code: Optional[str]
|
||||
@@ -257,7 +259,7 @@ class Event_Abstract_In(Event_Abstract_Base_New):
|
||||
|
||||
event_person_id: Optional[int]
|
||||
|
||||
event_session_id: Optional[int]
|
||||
# event_session_id: Optional[int]
|
||||
|
||||
# grant_json: Optional[Union[str, None]]
|
||||
|
||||
@@ -297,12 +299,12 @@ class Event_Abstract_In(Event_Abstract_Base_New):
|
||||
# return redis_lookup_id_random(record_id_random=id_random, table_name='event_presenter')
|
||||
# return None
|
||||
|
||||
@validator('event_session_id', always=True)
|
||||
def event_session_id_lookup(cls, v, values, **kwargs):
|
||||
if isinstance(v, int) and v > 0: return v
|
||||
elif id_random := values.get('event_session_id_random'):
|
||||
return redis_lookup_id_random(record_id_random=id_random, table_name='event_session')
|
||||
return None
|
||||
# @validator('event_session_id', always=True)
|
||||
# def event_session_id_lookup(cls, v, values, **kwargs):
|
||||
# if isinstance(v, int) and v > 0: return v
|
||||
# elif id_random := values.get('event_session_id_random'):
|
||||
# return redis_lookup_id_random(record_id_random=id_random, table_name='event_session')
|
||||
# return None
|
||||
|
||||
@validator('grant_id', always=True)
|
||||
def grant_id_lookup(cls, v, values, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user