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':
|
||||
# 图片上传成功,处理业务逻辑
|
||||
try:
|
||||
rpc.diet.add(session['user_id'],
|
||||
category=category,
|
||||
diet_image_id=result['_id'])
|
||||
rpc.diet.add(**{
|
||||
'user_id': session['user_id'],
|
||||
'category': category,
|
||||
'diet_image_id': result['_id'],
|
||||
})
|
||||
except Exception as e:
|
||||
raise DietCreationError(extra_data={'error_docs': str(e)})
|
||||
|
||||
|
|
Loading…
Reference in New Issue