2 Commits

Author SHA1 Message Date
Claire Kuang b9059e1b85 Update AutomateFunction.cs
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
2024-02-01 10:20:36 +00:00
Claire Kuang 3694e5703c Update AutomateFunction.cs
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
2024-02-01 09:57:06 +00:00
@@ -122,8 +122,19 @@ static class AutomateFunction
bool changed = !Equals(entry.Value, releaseObjectPropDict[entry.Key]);
if (changed)
{
string diff =
$"Property ({entry.Key}) changed from ({releaseObjectPropDict[entry.Key]}) to ({entry.Value})";
object? releaseValue = releaseObjectPropDict[entry.Key];
object? testValue = entry.Value;
string diff = $"Property ({entry.Key}) changed";
if (
releaseValue is not null
&& testValue is not null
&& !releaseValue.GetType().Equals(testValue.GetType())
)
{
diff +=
$" from ({releaseObjectPropDict[entry.Key]}) to ({entry.Value})";
}
if (!diffDictionary.ContainsKey(entry.Key))
{
diffDictionary.Add(entry.Key, diff);
@@ -176,7 +187,7 @@ static class AutomateFunction
else
{
// we're skipping objects without an applicationId for now, since we're doing so in the release commit
if (string.IsNullOrEmpty(testObject.applicationId))
if (!string.IsNullOrEmpty(testObject.applicationId))
{
//automationContext.AttachInfoToObjects(ADDED, new List<string>() { testObject.id });
addedList.Add(