Files
IfcOpenShell/src/ifcopenshell-python/ifcopenshell
Petru Conduraru ff798bc989 fix(selector): round() should not crash on non-numeric values (#6776)
FormatTransformer.round() called Decimal() directly on the input value,
which raises decimal.InvalidOperation when the value is a non-numeric
string (a text property, or a value carrying a unit suffix like "12.5 m").
In a spreadsheet export this crashed the entire operation as soon as one
element carried such a value.

Now round() catches InvalidOperation and returns the value unchanged, the
same graceful-fallback convention used by add(). Numeric rounding is
unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 2eea7728d2)
2026-07-25 23:15:23 +10:00
..
2026-06-11 18:28:36 +02:00
2026-07-22 19:01:50 +05:00
2026-07-24 21:50:49 +05:00
2025-12-19 18:53:14 +05:00
2026-07-22 19:01:49 +05:00