diff --git a/emgapianns/management/commands/import_qc.py b/emgapianns/management/commands/import_qc.py index b5d7beb3e..150fd2d19 100644 --- a/emgapianns/management/commands/import_qc.py +++ b/emgapianns/management/commands/import_qc.py @@ -85,17 +85,13 @@ def import_qc(reader, job, emg_db): job=job, var=var, defaults={'var_val_ucv': row[1]} ) - - analysis_job = AnalysisJob.objects.get(job_id=job) - analysis_summary = analysis_job.analysis_summary_json or [] + analysis_summary = job.analysis_summary_json or [] analysis_summary.append({ 'key': job_ann.var.var_name, 'value': job_ann.var_val_ucv, }) - - # Update analysis_summary_json with the modified array - analysis_job.analysis_summary_json = analysis_summary - analysis_job.save() + job.analysis_summary_json = analysis_summary + job.save() anns.append(job_ann) logger.info("Total %d Annotations for Run: %s" % (len(anns), job))