Make message more clear if file is not found in create_image_from_file view and added gunicorn

This commit is contained in:
ahmadbilalkhalid 2019-07-02 12:45:13 +05:00
commit 084da2eee5
3 changed files with 13 additions and 2 deletions

View file

@ -101,7 +101,9 @@ class CreateImage(Resource):
file_entry = client.get(f"/v1/files/{image_file_uuid}")
if file_entry is None:
return {"Message": "Image File Not Found"}, 400
return {
"Message":
f"Image File with uuid '{image_file_uuid}' Not Found"}, 400
file_entry_value = json.loads(file_entry.value)