Working on user and person

This commit is contained in:
Scott Idem
2021-04-08 18:42:59 -04:00
parent 92b36e502e
commit 06043197bd
3 changed files with 7 additions and 7 deletions

View File

@@ -38,7 +38,7 @@ class User_New_Base(BaseModel):
allow_auth_key: Optional[int]
enable: Optional[bool] = False
enable_from: Optional[datetime.datetime]
enable_from: Optional[datetime.datetime] = datetime.datetime.now(datetime.timezone.utc)
enable_to: Optional[datetime.datetime] = datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(days=365)
#super: Optional[bool] = False

View File

@@ -19,20 +19,20 @@ router = APIRouter()
@router.post('', response_model=Resp_Body_Base)
async def post_address_obj(
obj: Address_Base,
address_obj: Address_Base,
x_account_id: str = Header(...),
return_obj: Optional[bool] = True,
by_alias: Optional[bool] = True,
include: Optional[list] = [],
exclude: Optional[list] = [],
#include: Optional[list] = [],
#exclude: Optional[list] = [],
exclude_unset: Optional[bool] = True,
exclude_none: Optional[bool] = True,
):
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(locals())
obj_type = 'address'
obj_data_dict = obj.dict(by_alias=False, exclude_unset=True)
obj_data_dict = address_obj.dict(by_alias=False, exclude_unset=True)
result = post_obj_template(
obj_type=obj_type,
data=obj_data_dict,

View File

@@ -25,7 +25,7 @@ async def post_contact_obj(
by_alias: Optional[bool] = True,
exclude_unset: Optional[bool] = True,
):
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(locals())
obj_type = 'contact'