[damned-lies] Make sure pot stats collected has stats



commit 8ce10100ff30dbf01335537c8f575e16997ba0f7
Author: Claude Paroz <claude 2xlibre net>
Date:   Sun Aug 14 20:09:22 2011 +0200

    Make sure pot stats collected has stats
    
    There is a corner case where a stat has never been able to generate
    a proper pot file (e.g. unbuildable pot for new domain/module)

 stats/models.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/stats/models.py b/stats/models.py
index 1b9f1a6..a5511bc 100644
--- a/stats/models.py
+++ b/stats/models.py
@@ -1143,7 +1143,8 @@ class Release(models.Model):
         partial = False
         if dtype == "ui-part":
             dtype, partial = "ui", True
-        pot_stats = Statistics.objects.filter(language=None, branch__releases=self, domain__dtype=dtype)
+        pot_stats = Statistics.objects.filter(
+            language=None, branch__releases=self, domain__dtype=dtype, full_po__isnull=False)
         po_stats = dict([("%s-%s" % (st.branch_id, st.domain_id), st)
                          for st in Statistics.objects.filter(language=lang, branch__releases=self, domain__dtype=dtype)])
         lang_files = []



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]