diff --git a/API/Schema/Chapter.cs b/API/Schema/Chapter.cs index 695b826..ba8d36e 100644 --- a/API/Schema/Chapter.cs +++ b/API/Schema/Chapter.cs @@ -60,6 +60,9 @@ public class Chapter : IComparable { if (other is not { } otherChapter) throw new ArgumentException($"{other} can not be compared to {this}"); + //Compare Ids for Collection-Comparisons + if(other.ChapterId.Equals(this.ChapterId)) + return 0; return VolumeNumber?.CompareTo(otherChapter.VolumeNumber) switch { < 0 => -1,