From a0db0be32cc77e76af8717a646a35ce1f4affb3c Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 30 Mar 2022 18:27:07 +0200 Subject: [PATCH] Fix shared asset and schema scripts. --- backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Schema.cs | 2 +- .../Squidex.Domain.Apps.Core.Model/Schemas/SchemaScripts.cs | 2 -- .../Apps/DomainObject/AppDomainObject.State.cs | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Schema.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Schema.cs index 6d11d4dc6..2f5aaf4b3 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Schema.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Schema.cs @@ -29,7 +29,7 @@ namespace Squidex.Domain.Apps.Core.Schemas public FieldNames FieldsInReferences { get; private set; } = FieldNames.Empty; - public SchemaScripts Scripts { get; private set; } = SchemaScripts.Empty; + public SchemaScripts Scripts { get; private set; } = new SchemaScripts(); public SchemaProperties Properties { get; private set; } = new SchemaProperties(); diff --git a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/SchemaScripts.cs b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/SchemaScripts.cs index 2d4277182..4339965c6 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/SchemaScripts.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Model/Schemas/SchemaScripts.cs @@ -9,8 +9,6 @@ namespace Squidex.Domain.Apps.Core.Schemas { public sealed record SchemaScripts { - public static readonly SchemaScripts Empty = new SchemaScripts(); - public string? Change { get; init; } public string? Create { get; init; } diff --git a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObject.State.cs b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObject.State.cs index 81ea3c612..a756e7d83 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObject.State.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObject.State.cs @@ -41,7 +41,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.DomainObject public AppContributors Contributors { get; set; } = AppContributors.Empty; - public AssetScripts AssetScripts { get; set; } = AssetScripts.Empty; + public AssetScripts AssetScripts { get; set; } = new AssetScripts(); public LanguagesConfig Languages { get; set; } = LanguagesConfig.English; @@ -212,7 +212,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.DomainObject private bool UpdateAssetScripts(AssetScripts? scripts) { - AssetScripts = scripts ?? AssetScripts.Empty; + AssetScripts = scripts ?? new AssetScripts(); return true; }