Skip to content

Commit

Permalink
fix (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmi4er4 authored Jun 24, 2024
1 parent 363aa26 commit e92ca96
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/admission/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,8 +756,14 @@ def get(self, request, *args, **kwargs):
user = self.request.user
is_param_lost = any(param not in self.request.GET for param in ["status", "date_from", "date_to"])
if is_param_lost:
today = formats.date_format(now_local(user.branch.get_timezone()), "SHORT_DATE_FORMAT")
date_to = datetime(timezone.now().year, 8, 1)
if user.branch:
local_timezone = user.branch.get_timezone()
else:
campaign = get_default_campaign_for_user(user)
local_timezone = campaign.branch.get_timezone()
local_time = now_local(local_timezone)
today = formats.date_format(local_time, "SHORT_DATE_FORMAT")
date_to = datetime(local_time.year, 8, 1)
date_to = formats.date_format(date_to, "SHORT_DATE_FORMAT")
params = {
"status": [Interview.COMPLETED, Interview.APPROVED],
Expand Down

0 comments on commit e92ca96

Please sign in to comment.