Work on Impexium, exhibit, and badge related
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
from __future__ import annotations
|
||||
import datetime, hashlib, logging, os, pytz, redis, secrets
|
||||
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
@@ -56,6 +55,12 @@ def mk_resp(
|
||||
elif isinstance(data, list):
|
||||
log.info('Data type is a list')
|
||||
data_out = data
|
||||
elif isinstance(data, int):
|
||||
log.info('Data type is an int')
|
||||
data_out = { 'result': data }
|
||||
elif isinstance(data, str):
|
||||
log.info('Data type is a str')
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user