Working on post and post_comment and event
This commit is contained in:
@@ -25,16 +25,20 @@ class Event_Base(BaseModel):
|
||||
default_factory = lambda:secrets.token_urlsafe(default_num_bytes),
|
||||
)
|
||||
id: Optional[int] = Field(
|
||||
#alias = 'event_id'
|
||||
alias = 'event_id'
|
||||
)
|
||||
account_id_random: Optional[str]
|
||||
account_id: Optional[int]
|
||||
|
||||
poc_event_person_id_random: Optional[str]
|
||||
poc_event_person_id: Optional[int]
|
||||
|
||||
poc_person_id_random: Optional[str]
|
||||
poc_person_id: Optional[int]
|
||||
|
||||
user_id_random: Optional[str]
|
||||
user_id: Optional[int]
|
||||
|
||||
lu_event_type_id: Optional[int]
|
||||
#lu_event_type: Optional[str] # Needs to be reviewed
|
||||
|
||||
@@ -169,7 +173,6 @@ class Event_Base(BaseModel):
|
||||
return redis_lookup_id_random(record_id_random=values['poc_person_id_random'], table_name='person')
|
||||
return None
|
||||
|
||||
|
||||
@validator('user_id', always=True)
|
||||
def user_id_lookup(cls, v, values, **kwargs):
|
||||
log.setLevel(logging.WARNING)
|
||||
@@ -181,6 +184,7 @@ class Event_Base(BaseModel):
|
||||
|
||||
class Config:
|
||||
underscore_attrs_are_private = True
|
||||
allow_population_by_field_name = True
|
||||
fields = base_fields
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user