bugfixing issues related to new PropertyBag in workflow definition (#5778)
This commit is contained in:
parent
49c0a29427
commit
a0846effae
|
|
@ -22,7 +22,7 @@ public static class PropertyBagExtensions
|
|||
if (!propertyBag.TryGetValue(key, out var value))
|
||||
return defaultValue();
|
||||
|
||||
var json = (string)value;
|
||||
var json = value.ToString();
|
||||
return JsonSerializer.Deserialize<T>(json);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ internal class Post(
|
|||
draft.Name = model.Name?.Trim();
|
||||
draft.ToolVersion = model.ToolVersion;
|
||||
draft.Description = model.Description?.Trim();
|
||||
draft.CustomProperties = model.CustomProperties ?? new Dictionary<string, object>();
|
||||
draft.CustomProperties = model.CustomProperties ?? new Dictionary<string, object>();
|
||||
draft.PropertyBag = model.PropertyBag ?? new PropertyBag();
|
||||
draft.Variables = variables;
|
||||
draft.Inputs = inputs;
|
||||
draft.Outputs = outputs;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ namespace Elsa.Workflows.Management.Services
|
|||
draft.MaterializerName = JsonWorkflowMaterializer.MaterializerName;
|
||||
draft.Name = model.Name?.Trim();
|
||||
draft.Description = model.Description?.Trim();
|
||||
draft.CustomProperties = model.CustomProperties ?? new Dictionary<string, object>();
|
||||
draft.CustomProperties = model.CustomProperties ?? new Dictionary<string, object>();
|
||||
draft.PropertyBag = model.PropertyBag ?? new PropertyBag();
|
||||
draft.Variables = variables;
|
||||
draft.Inputs = model.Inputs ?? new List<InputDefinition>();
|
||||
draft.Outputs = model.Outputs ?? new List<OutputDefinition>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue