From dd193297e6760c89d659d1d67036bf06e13f956d Mon Sep 17 00:00:00 2001 From: paul019 <39464035+paul019@users.noreply.github.com> Date: Thu, 8 Aug 2024 00:07:03 +0200 Subject: [PATCH] Allow for zero as uncertainty --- src/api/parsers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/parsers.py b/src/api/parsers.py index 87bbd921..9597c620 100644 --- a/src/api/parsers.py +++ b/src/api/parsers.py @@ -209,7 +209,7 @@ def _parse_uncertainty_value(value: Union[float, int, str, Decimal]) -> Value: else: return_value = Value(Decimal(value)) - if return_value.get() <= 0: - raise ValueError(error_messages.FIELD_MUST_BE_POSITIVE.format(field="Uncertainty")) + if return_value.get() < 0: + raise ValueError(error_messages.FIELD_MUST_BE_NON_NEGATIVE.format(field="Uncertainty")) return return_value