diff --git a/backend/Core/Weeks/Week.cs b/backend/Core/Weeks/Week.cs index 46ed521d..e0d99c72 100644 --- a/backend/Core/Weeks/Week.cs +++ b/backend/Core/Weeks/Week.cs @@ -171,6 +171,9 @@ private bool DateIsInWeek(DateOnly day) public static bool operator ==(Week left, Week right) { + if (ReferenceEquals(left, right)) return true; + if (ReferenceEquals(left, null)) return false; + if (ReferenceEquals(right, null)) return false; return left.Year == right.Year && left.WeekNumber == right.WeekNumber; }