From 9d6db523b1885e0b1ae077a593704e525296b8c9 Mon Sep 17 00:00:00 2001
From: Jonathan Weth <git@jonathanweth.de>
Date: Wed, 21 Oct 2020 17:31:29 +0200
Subject: [PATCH] Refactor "and" sequence using all()

---
 aleksis/apps/alsijil/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aleksis/apps/alsijil/views.py b/aleksis/apps/alsijil/views.py
index b4ad66500..68d90185a 100644
--- a/aleksis/apps/alsijil/views.py
+++ b/aleksis/apps/alsijil/views.py
@@ -55,7 +55,7 @@ def lesson(
     else:
         wanted_week = None
 
-    if not (year and week and period_id):
+    if not all((year, week, period_id)):
         if lesson_period:
             return redirect(
                 "lesson_by_week_and_period",
-- 
GitLab