Skip to content

Commit 7c94a44

Browse files
committed
this was causing data to end up in a corrupt format when transferred.
nested-nested content should be transferred and stored by Deploy in the same way it is when saved by the CMS.
1 parent 6a4344c commit 7c94a44

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

src/Umbraco.Deploy.Contrib.Connectors/ValueConnectors/NestedContentValueConnector.cs

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,7 @@ public string ToArtifact(object value, PropertyType propertyType, ICollection<Ar
108108
_logger.Debug<NestedContentValueConnector>("Map " + key + " value '" + row.PropertyValues[key] + "' to '" + parsedValue
109109
+ "' using " + propValueConnector.GetType() + " for " + propType);
110110

111-
// test if the value is a json object (thus could be a nested complex editor)
112-
// if that's the case we'll need to add it as a json object instead of string to avoid it being escaped
113-
JToken jtokenValue = parsedValue != null && parsedValue.ToString().DetectIsJson() ? JToken.Parse(parsedValue.ToString()) : null;
114-
if (jtokenValue != null)
115-
{
116-
parsedValue = jtokenValue;
117-
}
118-
else if (parsedValue != null)
119-
{
120-
parsedValue = parsedValue.ToString();
121-
}
111+
parsedValue = parsedValue.ToString();
122112

123113
row.PropertyValues[key] = parsedValue;
124114
}
@@ -193,17 +183,7 @@ public object FromArtifact(string value, PropertyType propertyType, object curre
193183
}
194184
else
195185
{
196-
// test if the value is a json object (thus could be a nested complex editor)
197-
// if that's the case we'll need to add it as a json object instead of string to avoid it being escaped
198-
var jtokenValue = convertedValue.ToString().DetectIsJson() ? JToken.Parse(convertedValue.ToString()) : null;
199-
if (jtokenValue != null)
200-
{
201-
row.PropertyValues[key] = jtokenValue;
202-
}
203-
else
204-
{
205-
row.PropertyValues[key] = convertedValue;
206-
}
186+
row.PropertyValues[key] = convertedValue;
207187
}
208188
}
209189
else

0 commit comments

Comments
 (0)