Fix the condition
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user