From aad2081912c7c61033f3b5e442339536e3f8ad0f Mon Sep 17 00:00:00 2001 From: kozhilya Date: Tue, 13 May 2025 15:17:50 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82?= =?UTF-8?q?=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20?= =?UTF-8?q?=D1=81=20null=20=D0=B2=20=D0=BA=D0=BE=D0=BD=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D1=82=D0=B0=D1=86=D0=B8=D0=B8=20LocaleString?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Pf2eModel/Pf2eDbContextModel.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Pf2eModel/Pf2eDbContextModel.cs b/Pf2eModel/Pf2eDbContextModel.cs index 99e5fb6..56a8917 100644 --- a/Pf2eModel/Pf2eDbContextModel.cs +++ b/Pf2eModel/Pf2eDbContextModel.cs @@ -76,7 +76,10 @@ public partial class Pf2eDbContext { entity .Property(func) - .HasConversion(v => v.Serialize(), v => LocaleString.Deserialize(v)) + .HasConversion( + v => v == null ? null : v.Serialize(), + v => v == null ? null : LocaleString.Deserialize(v) + ) .HasColumnType("jsonb") .IsRequired(required); }