Skip to content

Commit

Permalink
Small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Feb 29, 2024
1 parent 7f3b403 commit 4d370b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lemarche/www/tenders/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ def get_queryset(self):
if self.status:
qs = qs.filter(status=self.status)

filter_form = TenderFilterForm(self.request.GET or None)
if filter_form.is_valid():
kind = filter_form.cleaned_data.get("kind")
self.filter_form = TenderFilterForm(data=self.request.GET)
if self.filter_form.is_valid():
kind = self.filter_form.cleaned_data.get("kind")
if kind:
qs = qs.filter(kind=kind)

Expand All @@ -325,7 +325,7 @@ def get_context_data(self, **kwargs):
context["page_title"] = TITLE_DETAIL_PAGE_SIAE if user_kind == User.KIND_SIAE else TITLE_DETAIL_PAGE_OTHERS
context["title_kind_sourcing_siae"] = TITLE_KIND_SOURCING_SIAE
context["tender_constants"] = tender_constants
context["filter_form"] = TenderFilterForm(self.request.GET or None)
context["filter_form"] = self.filter_form
return context


Expand Down

0 comments on commit 4d370b6

Please sign in to comment.