Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreJunod committed Dec 11, 2023
1 parent 920fa45 commit 61ad211
Show file tree
Hide file tree
Showing 4 changed files with 556 additions and 116 deletions.
4 changes: 1 addition & 3 deletions geocity/apps/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,10 +934,8 @@ def get_available_filters_for_agenda_as_qs(domain):
entity = AdministrativeEntity.objects.filter(
tags__name=domain
).first() # get can return an error
print(entity)
print(Field.objects.all().values("forms__administrative_entities"))

available_filters = Field.objects.filter(forms__administrative_entities=entity)
print(available_filters)

available_filters = available_filters.filter(
Q(filter_for_api=True)
Expand Down
2 changes: 1 addition & 1 deletion geocity/apps/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def get_queryset(self):
# Secure the number of query_params to dont be higher than the number of available_filters + 5
# + 5 for optional filters, like startsAt and endsAt, domain
if len(query_params) > len(available_filters) + 5:
return None
return submissions

# Do the required actions fo every query_param
for field_name in query_params:
Expand Down
Loading

0 comments on commit 61ad211

Please sign in to comment.