Work on file uploads and session proposals
This commit is contained in:
@@ -44,29 +44,26 @@ async def post_address_obj(
|
||||
return result
|
||||
|
||||
|
||||
@router.patch('/{obj_id}', response_model=Resp_Body_Base)
|
||||
@router.patch('/{address_obj_id}', response_model=Resp_Body_Base)
|
||||
async def patch_address_obj(
|
||||
obj: Address_Base,
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
address_obj: Address_Base,
|
||||
address_obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
x_account_id: Optional[str] = Header(..., ),
|
||||
return_obj: Optional[bool] = True,
|
||||
by_alias: Optional[bool] = True,
|
||||
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['id'] = redis_lookup_id_random(record_id_random=obj_id, table_name=obj_type)
|
||||
obj_data_dict['id_random'] = obj_id
|
||||
address_obj_type = 'address'
|
||||
address_obj_data_dict = address_obj.dict(by_alias=False, exclude_unset=True)
|
||||
address_obj_data_dict['id'] = redis_lookup_id_random(record_id_random=address_obj_id, table_name=address_obj_type)
|
||||
address_obj_data_dict['id_random'] = address_obj_id
|
||||
result = patch_obj_template(
|
||||
obj_type=obj_type,
|
||||
data=obj_data_dict,
|
||||
obj_id=obj_id,
|
||||
obj_type=address_obj_type,
|
||||
data=address_obj_data_dict,
|
||||
obj_id=address_obj_id,
|
||||
return_obj=True,
|
||||
by_alias=True,
|
||||
exclude_unset=True,
|
||||
|
||||
Reference in New Issue
Block a user