General clean up. Work on abstracts and websockets
This commit is contained in:
@@ -39,8 +39,10 @@ def mk_resp(
|
||||
status_name: str = '',
|
||||
success: bool = True,
|
||||
details: str = '',
|
||||
include: dict = None,
|
||||
exclude: dict = None,
|
||||
by_alias: bool = True,
|
||||
exclude_unset: bool = True,
|
||||
exclude_unset: bool = False,
|
||||
response: Response = None
|
||||
) -> dict:
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
@@ -63,7 +65,7 @@ def mk_resp(
|
||||
data_out = { 'result': data }
|
||||
else: # Assuming it is still and object. This should be improved. Example model type: "<class 'app.models.account_models.Account_Base'>"
|
||||
log.info('Data type is other')
|
||||
data_out = data.dict(by_alias=by_alias, exclude_unset=exclude_unset)
|
||||
data_out = data.dict(include=include, exclude=exclude, by_alias=by_alias, exclude_unset=exclude_unset)
|
||||
# log.debug(data_out)
|
||||
|
||||
resp_body = {}
|
||||
|
||||
Reference in New Issue
Block a user