fix: not able to save QC (backport #42371) (#42373)

fix: not able to save QC (#42371)

(cherry picked from commit 62fb495a65)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2024-07-17 21:36:47 +05:30
committed by GitHub
parent bebd70d752
commit 18500b8e3a

View File

@@ -242,6 +242,9 @@ class QualityInspection(Document):
# numeric readings
for i in range(1, 11):
field = "reading_" + str(i)
if reading.get(field) is None:
continue
data[field] = parse_float(reading.get(field))
data["mean"] = self.calculate_mean(reading)