Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix properties migration in case of properties null #295

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions KVA/Migration.Tool.Source/Services/PageBuilderPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ private async Task<bool> WalkSections(int siteId, List<SectionConfiguration> sec
logger.LogTrace("Walk section {TypeIdentifier}|{Identifier}", section.TypeIdentifier, section.Identifier);

var sectionFcs = sourceInstanceContext.GetSectionFormComponents(siteId, section.TypeIdentifier);
bool ndp1 = await MigrateProperties(siteId, section.Properties, sectionFcs, new Dictionary<string, IWidgetPropertyMigration>());
needsDeferredPatch = ndp1 || needsDeferredPatch;

if (section.Properties is { Count: > 0 } properties)
{
bool ndp1 = await MigrateProperties(siteId, properties, sectionFcs, new Dictionary<string, IWidgetPropertyMigration>());
needsDeferredPatch = ndp1 || needsDeferredPatch;
}

if (section.Zones is { Count: > 0 })
{
Expand Down
2 changes: 1 addition & 1 deletion Migration.Tool.Common/Model/EditableAreasConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public sealed class SectionConfiguration
[DataMember]
[JsonProperty("properties")]
// public ISectionProperties Properties { get; set; }
public JObject Properties { get; set; }
public JObject? Properties { get; set; }

/// <summary>Zones within the section.</summary>
[DataMember]
Expand Down
Loading