[damned-lies] Delete stats when domain is not (no more) accessible
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Delete stats when domain is not (no more) accessible
- Date: Thu, 8 Sep 2011 18:34:05 +0000 (UTC)
commit 605eb2a976a83cf0fc8eef9682d129808525e6a6
Author: Claude Paroz <claude 2xlibre net>
Date: Thu Sep 8 20:33:26 2011 +0200
Delete stats when domain is not (no more) accessible
stats/models.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/stats/models.py b/stats/models.py
index 269bbc9..15f960d 100644
--- a/stats/models.py
+++ b/stats/models.py
@@ -383,7 +383,8 @@ class Branch(models.Model):
# *******************
domain_path = os.path.join(self.co_path(), dom.directory)
if not os.access(domain_path, os.X_OK):
- # TODO: should check if existing stats, and delete (archive) them in this case
+ # Delete existing stats, if any
+ Statistics.objects.filter(branch=self, domain=dom).delete()
continue
errors = []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]