Skip to content

Commit

Permalink
DEFIVELO-228 Pass year when picking timesheets to determine the orphaned
Browse files Browse the repository at this point in the history
  • Loading branch information
OdyX committed May 16, 2023
1 parent 75f1567 commit 2da65c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/salary/views/timesheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ def get_context_data(self, **kwargs):
}
context["orphaned_timesheets"] = (
Timesheet.objects.filter(
user=self.selected_user, date__month=context["month"].month
user=self.selected_user,
date__year=context["year"],
date__month=context["month"].month,
)
.exclude(date__in=[o["day"] for o in self.object_list])
.order_by("date")
Expand Down

0 comments on commit 2da65c1

Please sign in to comment.