diff --git a/app/models/user_model.py b/app/models/user_model.py index cea6083..7161e57 100644 --- a/app/models/user_model.py +++ b/app/models/user_model.py @@ -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 diff --git a/app/routers/address.py b/app/routers/address.py index 43bde0b..d0d9cbb 100644 --- a/app/routers/address.py +++ b/app/routers/address.py @@ -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, diff --git a/app/routers/contact.py b/app/routers/contact.py index 16d992a..ae2d84d 100644 --- a/app/routers/contact.py +++ b/app/routers/contact.py @@ -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'