Skip to content

Commit

Permalink
Test for string result
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonski committed Mar 11, 2025
1 parent e32dcbc commit 4c2a2b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/senaite/core/exportimport/instruments/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ def convert_analysis_result(self, analysis, result):
:returns: Converted analysis result
"""

if api.is_floatable(result):
# ensure we have always a string result with a decimal point
if api.is_floatable(result) and not analysis.getStringResult():
# ensure floatable string result containing a decimal point
result = str(result)
if "." not in result:
result = "{}.0".format(result)
Expand Down

0 comments on commit 4c2a2b1

Please sign in to comment.