Remove order by in favor of ordering in the model
This commit is contained in:
parent
7566a2e430
commit
b9630092d5
@ -26,6 +26,9 @@ from .forms import AttendanceUpdateForm, PeriodForm
|
||||
class AttendanceOverview(LoginRequiredMixin, TemplateView):
|
||||
template_name = 'attendance/attendance_overview.html'
|
||||
|
||||
def get_queryset(self):
|
||||
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context['user'] = self.request.user
|
||||
@ -61,7 +64,7 @@ class AttendanceOverview(LoginRequiredMixin, TemplateView):
|
||||
clocked_in__year=timezone.now().year
|
||||
).filter(
|
||||
clocked_in__month=timezone.now().month
|
||||
).order_by('-clocked_in')
|
||||
)
|
||||
if student.current_period_id != None:
|
||||
context['current_period'] = Period.objects.get(pk=student.current_period_id)
|
||||
return context
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user