fixed anti-pattern code
This commit is contained in:
parent
5323ee2740
commit
9cfcd4e9e1
23
app/views.py
23
app/views.py
|
@ -62,18 +62,17 @@ def status():
|
||||||
records = mycursor.fetchall()
|
records = mycursor.fetchall()
|
||||||
if records == []:
|
if records == []:
|
||||||
return render_template('job_status_error.html',job=jobID)
|
return render_template('job_status_error.html',job=jobID)
|
||||||
else:
|
r = records[0]
|
||||||
r = records[0]
|
protein_name = r[1]
|
||||||
protein_name = r[1]
|
ligand_name = r[2]
|
||||||
ligand_name = r[2]
|
date = r[3]
|
||||||
date = r[3]
|
description = r[4]
|
||||||
description = r[4]
|
done = r[5]
|
||||||
done = r[5]
|
if done==1:
|
||||||
if done==1:
|
done="Completed"
|
||||||
done="Completed"
|
elif done==0:
|
||||||
elif done==0:
|
done="Queued"
|
||||||
done="Queued"
|
return render_template('job_status.html',ID=jobID,pn=protein_name,ln=ligand_name,subDate=date,desc=description,status=done)
|
||||||
return render_template('job_status.html',ID=jobID,pn=protein_name,ln=ligand_name,subDate=date,desc=description,status=done)
|
|
||||||
flash_errors(taskStatusForm)
|
flash_errors(taskStatusForm)
|
||||||
return render_template('job_status_form.html',form=taskStatusForm)
|
return render_template('job_status_form.html',form=taskStatusForm)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue