Skip to content

Commit

Permalink
corrected issues with import_qc, caused by trying to update the analy…
Browse files Browse the repository at this point in the history
…sis_summary_json field
  • Loading branch information
MGS-sails committed Sep 13, 2023
1 parent cd0345f commit 17f267c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions emgapianns/management/commands/import_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 17f267c

Please sign in to comment.