From 13652a46d38f741bc4a65be9dc21cd066603b94b Mon Sep 17 00:00:00 2001 From: ?ngel ?lvarez Date: Wed, 13 Sep 2017 11:33:38 +0200 Subject: [PATCH] fix round digits --- work.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work.py b/work.py index 3bc8631..edf5b48 100644 --- a/work.py +++ b/work.py @@ -112,7 +112,7 @@ class Work: key = getattr(obj, related_field) res[name][key.id] = (res[name].get(key.id, Decimal(0)) + val).quantize( - Decimal(str(10.0 ** digits))) + Decimal(str(10.0 ** -digits))) return res @classmethod