Commit f9f6d6f1 authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team

controllers/file.py: log message 'file already exists' does not give a server error anymore

Thanks to web2py tickets...
parent 5c775782
......@@ -48,8 +48,8 @@ def add_form():
query = db((db.sequence_file.patient_id==request.vars['patient_id'])).select()
for row in query :
if row.filename == request.vars['filename'] :
log.error(res)
res = {"message": "this sequence file already exists for this patient"}
log.error(res)
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
id = db.sequence_file.insert(sampling_date=request.vars['sampling_date'],
......
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