From dd06bba24bbf65ebd369e30ecc96d8e58b31d00f Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Thu, 24 Oct 2024 10:36:16 +1030 Subject: [PATCH] issue #1187 - handle bad gnomAD common annotation config --- snpdb/common_variants.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/snpdb/common_variants.py b/snpdb/common_variants.py index d1ccfec7f..a8baa0a76 100644 --- a/snpdb/common_variants.py +++ b/snpdb/common_variants.py @@ -73,8 +73,9 @@ def variants_classification_changed(sender, **kwargs): # pylint: disable=unused logging.info("variants_classification_changed_signal!! %s, %s", genome_build, variants) - # Look to see if any of these are in common filter (and not already handled) - for cgcfv in CohortGenotypeCommonFilterVersion.objects.filter(genome_build=genome_build): + # Look to see if any of these are used in a common filter (and not already handled) + for cgcfv in CohortGenotypeCommonFilterVersion.objects.filter(genome_build=genome_build, + cohortgenotypecollection__isnull=False): va_qs = VariantAllele.objects.filter(variant__in=variants, genome_build=genome_build) va_qs = va_qs.exclude(variant__commonvariantclassified__common_filter=cgcfv)