mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix bug where updating type text literals didn't propagate and formatting rounding null values wasn't handled.
This commit is contained in:
@@ -195,7 +195,7 @@ class FormatTransformer(lark.Transformer):
|
||||
return str(args[0])[int(args[1]) :]
|
||||
|
||||
def round(self, args):
|
||||
value = Decimal(args[0] or 0.0)
|
||||
value = Decimal(0.0 if args[0] == "None" else args[0] or 0.0)
|
||||
nearest = Decimal(args[1])
|
||||
result = round(value / nearest) * nearest
|
||||
if nearest % 1 == 0:
|
||||
|
||||
Reference in New Issue
Block a user