We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55f9a0d commit 0797eb8Copy full SHA for 0797eb8
ami/main/models.py
@@ -565,11 +565,12 @@ def update_calculated_fields(self, save=False):
565
.count()
566
)
567
self.taxa_count = (
568
- Taxon.objects.filter(
569
- occurrences__deployment=self,
570
- occurrences__determination_score__gte=settings.DEFAULT_CONFIDENCE_THRESHOLD,
571
- occurrences__event__isnull=False,
+ self.occurrences.filter(
+ determination_score__gte=settings.DEFAULT_CONFIDENCE_THRESHOLD,
+ event__isnull=False,
+ deployment=self,
572
573
+ .values_list("determination", flat=True)
574
.distinct()
575
576
0 commit comments