From 1ed0e73ece569d0e5172ea27682e25bdb796f75e Mon Sep 17 00:00:00 2001
From: Hangzhi Yu <hangzhi@protonmail.com>
Date: Tue, 13 Feb 2024 18:49:44 +0100
Subject: [PATCH] Exclude substituted lessons from coursebook

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

diff --git a/aleksis/apps/alsijil/models.py b/aleksis/apps/alsijil/models.py
index 65ac367a1..a2d37a972 100644
--- a/aleksis/apps/alsijil/models.py
+++ b/aleksis/apps/alsijil/models.py
@@ -530,7 +530,6 @@ class Documentation(CalendarEvent):
         """
 
         # 1. Find all LessonEvents for all Lessons of this Course in this date range
-        #  TODO: verify that substitutions don't break this
         events = LessonEvent.get_single_events(
             date_start,
             date_end,
@@ -538,6 +537,7 @@ class Documentation(CalendarEvent):
             {
                 "type": obj_type,
                 "id": obj_id,
+                "not_amended": True,
             },
             with_reference_object=True,
         )
-- 
GitLab