diff --git a/CHANGELOG.md b/CHANGELOG.md index f2c40800a5..c590b54f9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ About changelog [here](https://keepachangelog.com/en/1.0.0/) ## [4.32.1] ### Fixed - iSort lint check only +- Institute cases page crashing when a case has track:Null ### Added ### Changed diff --git a/scout/adapter/mongo/case.py b/scout/adapter/mongo/case.py index 963e2202d5..d633f5ebfe 100644 --- a/scout/adapter/mongo/case.py +++ b/scout/adapter/mongo/case.py @@ -779,7 +779,7 @@ def update_case(self, case_obj, keep_date=False): "smn_tsv": case_obj.get("smn_tsv"), "status": case_obj.get("status"), "sv_rank_model_version": case_obj.get("sv_rank_model_version"), - "track": case_obj.get("track"), + "track": case_obj.get("track", "rare"), "updated_at": updated_at, "variants_stats": case_obj.get("variants_stats"), "vcf_files": case_obj.get("vcf_files"), diff --git a/scout/server/blueprints/institutes/controllers.py b/scout/server/blueprints/institutes/controllers.py index b7680d3f48..658b48c958 100644 --- a/scout/server/blueprints/institutes/controllers.py +++ b/scout/server/blueprints/institutes/controllers.py @@ -20,7 +20,8 @@ from .forms import CaseFilterForm -TRACKS = {"rare": "Rare Disease", "cancer": "Cancer"} +# Do not assume all cases have a valid track set +TRACKS = {None: "Rare Disease", "rare": "Rare Disease", "cancer": "Cancer"} def institute(store, institute_id):