From a4bc77405fbc6e2e4fd0277e3fdb9813c2995af4 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 14 Sep 2022 17:20:35 +0200 Subject: [PATCH] Fix rule creation. --- cli/Squidex.CLI/Directory.Build.props | 2 +- .../Commands/Implementation/Sync/Rules/Extensions.cs | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cli/Squidex.CLI/Directory.Build.props b/cli/Squidex.CLI/Directory.Build.props index bf867258..2cf4d0dc 100644 --- a/cli/Squidex.CLI/Directory.Build.props +++ b/cli/Squidex.CLI/Directory.Build.props @@ -8,6 +8,6 @@ MIT https://github.com/Squidex/squidex/ Squidex HeadlessCMS - 8.20 + 8.21 diff --git a/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Rules/Extensions.cs b/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Rules/Extensions.cs index 9d5f407c..174c79db 100644 --- a/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Rules/Extensions.cs +++ b/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Rules/Extensions.cs @@ -15,12 +15,20 @@ internal static class Extensions { public static UpdateExtendableRuleDto ToUpdate(this RuleModel model) { - return SimpleMapper.Map(model, new UpdateExtendableRuleDto()); + var result = SimpleMapper.Map(model, new UpdateExtendableRuleDto()); + + result.Action = model.Action; + + return result; } public static CreateExtendableRuleDto ToCreate(this RuleModel model) { - return SimpleMapper.Map(model, new CreateExtendableRuleDto()); + var result = SimpleMapper.Map(model, new CreateExtendableRuleDto()); + + result.Action = model.Action; + + return result; } public static string TypeName(this RuleTriggerDto trigger)