Fix the condition
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled

This commit is contained in:
oguzhankoral
2024-11-13 09:09:05 +00:00
parent a62633974f
commit cbfdd67306
@@ -71,11 +71,23 @@ public static class AutomateFunction
foreach (var failedObject in failedObjects)
{
var speckleTypeString = failedObject.SpeckleType.ToString();
string message = "";
if (failedObject.UValue == 0)
{
message =
$"{speckleTypeString[..^1]} has no any material that have thermal properties.";
}
else
{
message =
$"{speckleTypeString[..^1]} expected to have maximum {failedObject.ExpectedUValue} U-value but it is {failedObject.UValue}.";
}
automationContext.AttachResultToObjects(
ObjectResultLevel.Error,
speckleTypeString,
new[] { failedObject.Id },
$"{speckleTypeString[..^1]} expected to have maximum {failedObject.ExpectedUValue} U-value but it is {failedObject.UValue}."
message
);
}
}
@@ -171,7 +183,7 @@ public static class AutomateFunction
expectedValue,
speckleType
));
return objectsToCheck.Where(obj => obj.UValue < expectedValue);
return objectsToCheck.Where(obj => obj.UValue > expectedValue || obj.UValue == 0);
}
private static ClimateZone GetClimateZone(string climateZoneString)