diff --git a/lemarche/sectors/models.py b/lemarche/sectors/models.py index bad1345d0..106da927d 100644 --- a/lemarche/sectors/models.py +++ b/lemarche/sectors/models.py @@ -55,6 +55,9 @@ def form_filter_queryset(self): def with_siae_stats(self): return self.annotate(siae_count_annotated=Count("siaes", distinct=True)) + def with_tender_stats(self): + return self.annotate(tender_count_annotated=Count("tenders", distinct=True)) + class Sector(models.Model): name = models.CharField(verbose_name="Nom", max_length=255)