fix: 修复食物图片上传接口
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
0353bbe7b4
commit
73f6470559
|
@ -69,9 +69,11 @@ def upload_diet_image(files_data):
|
||||||
if result.get('status') and result['status'] == 'UPLOADED':
|
if result.get('status') and result['status'] == 'UPLOADED':
|
||||||
# 图片上传成功,处理业务逻辑
|
# 图片上传成功,处理业务逻辑
|
||||||
try:
|
try:
|
||||||
rpc.diet.add(session['user_id'],
|
rpc.diet.add(**{
|
||||||
category=category,
|
'user_id': session['user_id'],
|
||||||
diet_image_id=result['_id'])
|
'category': category,
|
||||||
|
'diet_image_id': result['_id'],
|
||||||
|
})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise DietCreationError(extra_data={'error_docs': str(e)})
|
raise DietCreationError(extra_data={'error_docs': str(e)})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue