From 54a48dfe88a4cdc4b044a1bfcaf511659b036cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 28 Feb 2012 10:27:59 +0100 Subject: [PATCH] Store directly percent --- trans/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trans/models.py b/trans/models.py index 83061e6d2..665de316d 100644 --- a/trans/models.py +++ b/trans/models.py @@ -204,8 +204,8 @@ class Translation(models.Model): total = self.unit_set.count() fuzzy = self.unit_set.filter(fuzzy = True).count() translated = self.unit_set.filter(translated = True).count() - self.fuzzy = fuzzy * 1.0 / total - self.translated = translated * 1.0 / total + self.fuzzy = round(fuzzy * 100.0 / total, 1) + self.translated = round(translated * 100.0 / total, 1) self.revision = blob.hexsha self.save()