From 6d1c9b7de81a58afa55326df6c80eaa9a0a99a56 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 21 Sep 2024 16:23:31 +0200 Subject: [PATCH] Removed unnecessary lines --- model/semester.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/model/semester.go b/model/semester.go index 4b0844d37..c6a27427f 100644 --- a/model/semester.go +++ b/model/semester.go @@ -14,13 +14,6 @@ func (s *Semester) InRangeOfSemesters(firstSemester Semester, lastSemester Semes return s.Year == firstSemester.Year && s.TeachingTerm == firstSemester.TeachingTerm } return s.GreaterEqualThan(firstSemester) && lastSemester.GreaterEqualThan(*s) - /* Alternative: - return !(s.Year < firstSemester.Year || s.Year > lastSemester.Year || - (s.Year == firstSemester.Year && s.TeachingTerm == "S" && firstSemester.TeachingTerm == "W") || - (s.Year == lastSemester.Year && s.TeachingTerm == "W" && lastSemester.TeachingTerm == "S"))*/ - } - if len(semesters) == 1 { - return s.Year == semesters[0].Year && s.TeachingTerm == semesters[0].TeachingTerm } for _, semester := range semesters { if s.Year == semester.Year && s.TeachingTerm == semester.TeachingTerm {