fix: update body record api
continuous-integration/drone/push Build is passing Details

This commit is contained in:
BryantHe 2023-08-14 15:58:48 +08:00
parent 923c5f1a6d
commit 72bee4d3e1
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ def get_record(record_id):
try: try:
result = rpc.body_record.get_one(record_id) result = rpc.body_record.get_one(record_id)
except Exception as e: except Exception as e:
raise BodyRecordNotFound() raise BodyRecordNotFound(extra_data={'error_docs': str(e)})
return result return result
@ -48,5 +48,5 @@ def get_records(query_data):
sort = query_data.get('sort', '-create_time') sort = query_data.get('sort', '-create_time')
results = rpc.body_record.get_all_by_user(session['user_id'], sort) results = rpc.body_record.get_all_by_user(session['user_id'], sort)
except Exception as e: except Exception as e:
raise BodyRecordNotFound() raise BodyRecordNotFound(extra_data={'error_docs': str(e)})
return {'records': results} return {'records': results}