Skip to content

Commit

Permalink
Merge pull request #295 from Kentico/fix/issue-294
Browse files Browse the repository at this point in the history
Fix properties migration in case of properties null
  • Loading branch information
akfakmot authored Nov 12, 2024
2 parents fd66e32 + 620c23b commit ab27b8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
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

0 comments on commit ab27b8f

Please sign in to comment.