Skip to content

Commit

Permalink
Only shows active projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Ederporto committed Feb 3, 2024
1 parent 09523b0 commit 2c9ad43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion metrics/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def show_metrics_per_project(request):
def get_metrics_and_aggregate_per_project():
aggregated_metrics_and_results = {}

for project in Project.objects.all():
for project in Project.objects.filter(active=True):
project_metrics = []
for activity in Activity.objects.filter(area__project=project):
activity_metrics = {}
Expand Down
2 changes: 1 addition & 1 deletion report/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, *args, **kwargs):
self.fields["directions_related"].choices = directions_associated_as_choices()
self.fields["learning_questions_related"].choices = learning_questions_as_choices()
self.fields["area_responsible"].queryset = TeamArea.objects.order_by(Lower("text"))
self.fields["funding_associated"].queryset = Funding.objects.order_by(Lower("name"))
self.fields["funding_associated"].queryset = Funding.objects.filter(project__active=True).order_by(Lower("name"))
self.fields["area_activated"].queryset = AreaActivated.objects.order_by(Lower("text"))
self.fields["partners_activated"].queryset = Partner.objects.order_by(Lower("name"))
if self.instance.id:
Expand Down

0 comments on commit 2c9ad43

Please sign in to comment.