# 342 Fix
* fixes bug where rounding error on aggregated db SUM() would occur * simplifies code base
This commit is contained in:
@@ -199,7 +199,9 @@ class AbstractCompensation(BaseObject,
|
||||
Returns:
|
||||
|
||||
"""
|
||||
return qs.aggregate(Sum("surface"))["surface__sum"] or 0
|
||||
val = qs.aggregate(Sum("surface"))["surface__sum"] or 0
|
||||
val = float('{:0.2f}'.format(val))
|
||||
return val
|
||||
|
||||
def quality_check(self) -> CompensationQualityChecker:
|
||||
""" Performs data quality check
|
||||
|
||||
Reference in New Issue
Block a user