Commit 9e85fddb authored by Mikaël Salson's avatar Mikaël Salson Committed by Vidjil Team
Browse files

controllers/ Controller to delete only the sequence file (without results)

parent f918bdb3
......@@ -154,6 +154,15 @@ def confirm():
return error_message("you need admin permission to delete this file")
def delete_sequence_file(seq_id):
sequence = db.sequence_file[seq_id]
seq_filename = sequence.data_file
if auth.can_modify_patient(sequence.patient_id):
log.debug('Deleting '+defs.DIR_SEQUENCES+seq_filename+' with ID'+str(seq_id))
db.sequence_file[seq_id] = dict(data_file = None)
return error_message('you need admin permission to delete this file')
def delete():
import shutil, os.path
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