diff --git a/rrs/models.py b/rrs/models.py index 8532b25..4608f9f 100644 --- a/rrs/models.py +++ b/rrs/models.py @@ -271,6 +271,11 @@ class RecipeUpstream(models.Model): no_update_reason = models.CharField(max_length=255, blank=True, db_index=True) date = models.DateTimeField(db_index=True) + @staticmethod + def get_all_recipes(history): + qry = RecipeUpstream.objects.filter(history = history) + return qry + @staticmethod def get_recipes_not_updated(history): qry = RecipeUpstream.objects.filter(history = history, status = 'N', diff --git a/rrs/views.py b/rrs/views.py index e5126f6..fc43d7d 100644 --- a/rrs/views.py +++ b/rrs/views.py @@ -42,8 +42,8 @@ def _get_milestone_statistics(milestone, maintainer_name=None): ) if maintainer_name is None: - milestone_statistics['all'] = Recipe.objects.all().count() - + milestone_statistics['all'] = \ + RecipeUpstream.get_all_recipes(recipe_upstream_history).count() milestone_statistics['up_to_date'] = \ RecipeUpstream.get_recipes_up_to_date(recipe_upstream_history).count() milestone_statistics['not_updated'] = \