Browse Source

Fix shared asset and schema scripts.

pull/861/head
Sebastian 4 years ago
parent
commit
a0db0be32c
  1. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Schemas/Schema.cs
  2. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Schemas/SchemaScripts.cs
  3. 4
      backend/src/Squidex.Domain.Apps.Entities/Apps/DomainObject/AppDomainObject.State.cs

2
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 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(); public SchemaProperties Properties { get; private set; } = new SchemaProperties();

2
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 sealed record SchemaScripts
{ {
public static readonly SchemaScripts Empty = new SchemaScripts();
public string? Change { get; init; } public string? Change { get; init; }
public string? Create { get; init; } public string? Create { get; init; }

4
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 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; public LanguagesConfig Languages { get; set; } = LanguagesConfig.English;
@ -212,7 +212,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.DomainObject
private bool UpdateAssetScripts(AssetScripts? scripts) private bool UpdateAssetScripts(AssetScripts? scripts)
{ {
AssetScripts = scripts ?? AssetScripts.Empty; AssetScripts = scripts ?? new AssetScripts();
return true; return true;
} }

Loading…
Cancel
Save