Fix bug where updating type text literals didn't propagate and formatting rounding null values wasn't handled.

This commit is contained in:
Dion Moult
2024-01-10 14:42:14 +11:00
parent a33f30e8ce
commit 6ea1e378c5
2 changed files with 26 additions and 7 deletions
@@ -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: