Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 86c0332e authored by Mikaël Salson's avatar Mikaël Salson

server/file: Add the sample type to the sample add form

As code is duplicated between the edit form and the add form, this
is the same code as efc4589
parent b354da20
......@@ -87,6 +87,7 @@ def add():
run_list = run_list,
pre_process_list = pre_process_list,
patient = patient,
sample_type = sample_set.sample_type,
run = run)
......@@ -151,7 +152,6 @@ def add_form():
ids_sample_set += [run_sample_set_id] # for logging
id_sample_set_membership_run = db.sample_set_membership.insert(sample_set_id=run_sample_set_id,
sequence_file_id=id)
redirect_args = {"id" : run_sample_set_id}
#add sequence_file to a patient sample_set
if patient_id is not None :
......@@ -159,7 +159,12 @@ def add_form():
ids_sample_set += [patient_sample_set_id] # for logging
id_sample_set_membership_patient = db.sample_set_membership.insert(sample_set_id=patient_sample_set_id,
sequence_file_id=id)
redirect_args = {"id" : patient_sample_set_id}
originating_id = patient_sample_set_id
if request.vars['sample_type'] == 'run':
originating_id = run_sample_set_id
redirect_args = {"id" : originating_id}
res = {"file_id" : id,
......
......@@ -5,6 +5,7 @@
<form id="upload_form" action="DB_ADDRESS/file/add_form" enctype="multipart/form-data" method="post">
<input type="hidden" id="filename" name="filename" type="text" value="">
<input type="hidden" id="sample_type" name="sample_type" value="{{=sample_type}}" />
<table>
<tbody>
<tr class='db_table_split' ><td colspan="2"> sequence file(s) </td></tr>
......
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