From 74d59592353780a875e17bc686ef9afb1661d54f Mon Sep 17 00:00:00 2001 From: fosterfarrell9 <28628554+fosterfarrell9@users.noreply.github.com> Date: Tue, 20 Aug 2024 19:15:02 +0200 Subject: [PATCH] Add missing case that Term.active is nil --- app/models/lecture.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/lecture.rb b/app/models/lecture.rb index 7fd197471..1519d6376 100644 --- a/app/models/lecture.rb +++ b/app/models/lecture.rb @@ -831,6 +831,7 @@ def speakers end def older_than?(timespan) + return false unless Term.active return true unless term term.begin_date <= Term.active.begin_date - timespan