Commit 55694756 authored by Mikaël Salson's avatar Mikaël Salson Committed by Vidjil Team
Browse files upload message

One upload is finished, a message is displayed.
patient_id is a Row, so display the id instead of displaying something like Row(...).
Also request.vars['id'] is the file ID which doesn't mean anything to anyone, so replace
it with the filename.

Remove the semicolon at the end (we may have nothing more after that).
parent 5b2505c2
......@@ -150,7 +150,7 @@ def upload():
&(db.sample_set_membership.sequence_file_id ==
&(db.patient.sample_set_id == db.sample_set_membership.sample_set_id)
mes += "file %s (%s): " % (request.vars['id'], patient_id)
mes += " file %s (patient %s) " % (db.sequence_file[request.vars['id']].filename, patient_id['id'])
res = {"message": mes + "processing uploaded file",
"redirect": "patient/info",
"args" : {"id" : request.vars['id']}
......@@ -163,9 +163,9 @@ def upload():
mes += "upload finished"
except IOError as e:
if str(e).find("File name too long") > -1:
error += 'Your filename is too long, please shorten it'
error += 'Your filename is too long, please shorten it.'
error += "System error during processing of uploaded file"
error += "System error during processing of uploaded file."
data_file = db.sequence_file[request.vars["id"]].data_file
......@@ -182,7 +182,7 @@ def upload():
db.sequence_file[request.vars["id"]] = dict(size_file = size)
# Log and exit
res = {"message": mes + error}
res = {"message": error + mes}
if error:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment