From d7d0df1d5e3de7412df2d9e932c6331b15faf807 Mon Sep 17 00:00:00 2001 From: Francis Pion Date: Mon, 7 Oct 2024 12:12:50 -0400 Subject: [PATCH] fix --- backend/src/Logitar.Cms.Core/Languages/Locale.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/Logitar.Cms.Core/Languages/Locale.cs b/backend/src/Logitar.Cms.Core/Languages/Locale.cs index 8ada3ab..3dce221 100644 --- a/backend/src/Logitar.Cms.Core/Languages/Locale.cs +++ b/backend/src/Logitar.Cms.Core/Languages/Locale.cs @@ -17,8 +17,8 @@ public Locale(CultureInfo culture) new Validator().ValidateAndThrow(this); } - public override bool Equals(object? obj) => obj is Locale locale && locale.Culture.Equals(Culture); - public override int GetHashCode() => Culture.GetHashCode(); + public override bool Equals(object? obj) => obj is Locale locale && locale.Code == Code; + public override int GetHashCode() => Code.GetHashCode(); public override string ToString() => $"{DisplayName} ({Code})"; public class Validator : AbstractValidator