More again again again. Moving ID random generation to the SQL db instead. General clean up.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import datetime, hashlib, logging, os, pytz, redis, secrets
|
||||
import datetime, pytz
|
||||
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
from pydantic import BaseModel, EmailStr, Field, Json, PrivateAttr, ValidationError, validator
|
||||
@@ -12,6 +12,7 @@ from app.models.event_cfg_models import Event_Cfg_Base
|
||||
from app.models.organization_models import Organization_Base
|
||||
|
||||
|
||||
# ### BEGIN ### API Event Person Profile Models ### Event_Person_Profile_Base() ###
|
||||
class Event_Person_Profile_Base(BaseModel):
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
@@ -19,7 +20,6 @@ class Event_Person_Profile_Base(BaseModel):
|
||||
id_random: Optional[str] = Field(
|
||||
**base_fields['event_person_profile_id_random'],
|
||||
alias = 'event_person_profile_id_random',
|
||||
default_factory = lambda:secrets.token_urlsafe(default_num_bytes),
|
||||
)
|
||||
id: Optional[int] = Field(
|
||||
alias = 'event_person_profile_id'
|
||||
@@ -183,3 +183,4 @@ class Event_Person_Profile_Base_Up(Event_Person_Profile_Base):
|
||||
|
||||
# Including JSON data
|
||||
extended_json: Optional[str]
|
||||
# ### END ### API Event Person Profile Models ### Event_Person_Profile_Base() ###
|
||||
|
||||
Reference in New Issue
Block a user