diff --git a/seal/schedulers.py b/seal/schedulers.py index 08b0e84..49fbd8d 100644 --- a/seal/schedulers.py +++ b/seal/schedulers.py @@ -449,7 +449,7 @@ def importvcf(): app.logger.error(f'Path does not exist for : {vcf_path}') path_locker.unlink() return - + status_final = False if "add_caller" in data and data["add_caller"] == True: sample = get_sample(data) if not sample: @@ -457,6 +457,7 @@ def importvcf(): path_locker.unlink() return msg = "Add new caller" + status_final = sample.status else: sample = create_sample(data) msg = "Import Sample" @@ -493,7 +494,8 @@ def importvcf(): app.logger.info("------ END VEP ------") except CommandFailedError as e: app.logger.info(f"{type(e).__name__} : {e}") - sample.status = -1 + if not status_final: + sample.status = -1 path_locker.unlink() db.session.commit() error_file = current_file.with_suffix('.error') @@ -678,7 +680,8 @@ def importvcf(): date=datetime.now(), action=f"Sample Imported") db.session.add(history) - sample.status = 1 + if not status_final: + sample.status = status db.session.commit() diff --git a/seal/static/seal/analysis/sample.js b/seal/static/seal/analysis/sample.js index 51bba43..feb2822 100644 --- a/seal/static/seal/analysis/sample.js +++ b/seal/static/seal/analysis/sample.js @@ -360,7 +360,6 @@ function BaseConditionsFilterSelect(values_options, condition="==", sort=true) { } if (sort) { options.sort((a, b) => { - console.log(a.val()) if (a.val().toLowerCase() < b.val().toLowerCase()) { return -1; } else if (a.val().toLowerCase() > b.val().toLowerCase()) { @@ -408,14 +407,6 @@ function BaseConditionsFilterSelect(values_options, condition="==", sort=true) { case "isTrue": conditionName = "Is True"; search = function (value) { - console.log("t"); - console.log((value === false || - value === "false" || - value === "0" || - value === null || - value === undefined || - value === "" || - (typeof value === 'number' && isNaN(value)))) return value === true || value === "true" || value === "1" || @@ -426,14 +417,6 @@ function BaseConditionsFilterSelect(values_options, condition="==", sort=true) { case "isFalse": conditionName = "Is False"; search = function (value) { - console.log("f"); - console.log((value === false || - value === "false" || - value === "0" || - value === null || - value === undefined || - value === "" || - (typeof value === 'number' && isNaN(value)))) return value === false || value === "false" || value === "0" || diff --git a/seal/templates/analysis/sample.html b/seal/templates/analysis/sample.html index b872f55..cca0563 100644 --- a/seal/templates/analysis/sample.html +++ b/seal/templates/analysis/sample.html @@ -548,6 +548,9 @@