Commit 86347cac authored by Penom Nom's avatar Penom Nom
Browse files

fix a buf with delete run and analyses. Metadata becomes a simple list

parent 896932b5
......@@ -145,7 +145,7 @@ class Workflow(threading.Thread):
self.params_order = []
self.define_parameters(self.function)
# add the metadata parameter
self.add_parameter_list("metadata", "Which metadata should be linked to this workflow")
self.metadata = []
if self.id is not None:
self.directory = self.manager.get_workflow_directory(self.name, self.id)
......
......@@ -1341,10 +1341,10 @@ class tx_nG6_db {
$res = tx_nG6_utils::delete_directory($user_login, $user_pwd, $data_folder.$my_run['directory']);
}
// delete all run analyzes
$run_comments = tx_nG6_utils::get_all_run_comments($r_id);
// delete all run comments
$run_comments = tx_nG6_db::get_all_run_comments($r_id);
foreach ($run_comments as $id => $values){
tx_nG6_utils::delete_run_comment($r_id, $values['id']);
tx_nG6_db::delete_run_comment($r_id, $values['id']);
}
return $res;
......@@ -1754,9 +1754,9 @@ class tx_nG6_db {
}
// delete all analyze comments
$analyzes_comments = tx_nG6_utils::get_all_analyze_comments($a_id) ;
$analyzes_comments = tx_nG6_db::get_all_analyze_comments($a_id) ;
foreach ($analyzes_comments as $id => $values){
tx_nG6_utils::delete_analyze_comment($a_id, $values['id']);
tx_nG6_db::delete_analyze_comment($a_id, $values['id']);
}
return $res;
......
......@@ -1881,7 +1881,6 @@ function addRunHandler() {
if ($("#view").val() == "project") {
parameters = {"project_id": $("#ids").val()};
}
parameters["metadata"] = [];
parameters["admin_login"] = $("#user_login").val();
$('#wfForm').wfform({
......@@ -1940,7 +1939,7 @@ function addProjectHandler(){
workflowClass: "AddProject",
displayRunButton: false,
displayResetButton: false,
parameters: {"admin_login": $("#user_login").val(), "metadata": []},
parameters: {"admin_login": $("#user_login").val()},
serverURL: $("#server_url").val()
});
$('#setAndRunModalBody').on('run', function(event, running_wf) {
......@@ -2071,8 +2070,7 @@ function addFileHandler( event ){
else if (run_id) {
parameters["run_id"] = run_id;
parameters["analysis_id"] = null;
}
parameters["metadata"] = [];
}
parameters["admin_login"] = $("#user_login").val();
$("#close").show();
......@@ -2156,7 +2154,6 @@ function addAnalysisHandler(){
parameters["project_id"] = project_id;
parameters["run_id"] = null;
}
parameters["metadata"] = [];
parameters["admin_login"] = $("#user_login").val();
$('#wfForm').on("loaded", function(event, workflow) {
......
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