From 9913c88c6fef816e68ca1a7903de355c37bbf88d Mon Sep 17 00:00:00 2001
From: Dominik George <nik@naturalnet.de>
Date: Thu, 22 Aug 2019 23:12:52 +0200
Subject: [PATCH] Revert "Use get_or_none instead of first."

This reverts commit b9a8c04ec8cc5527ccf18f8f37c7ee0f9e7d8088.
---
 biscuit/apps/alsijil/views.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/biscuit/apps/alsijil/views.py b/biscuit/apps/alsijil/views.py
index 75e27b19a..1a8e1ab28 100644
--- a/biscuit/apps/alsijil/views.py
+++ b/biscuit/apps/alsijil/views.py
@@ -20,8 +20,8 @@ def lesson(request: HttpRequest, week: Optional[int] = None, period_id: Optional
         lesson_period = LessonPeriod.objects.get(pk=period_id)
         wanted_week = week
     else:
-        lesson_period = current_lesson_periods().get_or_none(
-            lesson__teachers=request.user.person)
+        lesson_period = current_lesson_periods().filter(
+            lesson__teachers=request.user.person).first()
         wanted_week = current_week()
 
     context['lesson_period'] = lesson_period
-- 
GitLab