You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/08/20 19:22:45 UTC

[3/5] git commit: [#6532] ticket:412 ignore forks with non existing app_config_id

[#6532] ticket:412 ignore forks with non existing app_config_id


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ba700e34
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ba700e34
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ba700e34

Branch: refs/heads/cj/6422
Commit: ba700e34e495ad7dfb673cc875e6f048645cc02e
Parents: ed2ca56
Author: Anton Kasyanov <mi...@gmail.com>
Authored: Mon Aug 19 13:25:42 2013 +0300
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Mon Aug 19 20:16:30 2013 +0000

----------------------------------------------------------------------
 Allura/allura/model/repository.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ba700e34/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index e29cd0a..9db3747 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -533,7 +533,8 @@ class Repository(Artifact, ActivityObject):
 
     @property
     def forks(self):
-        return self.query.find({'upstream_repo.name': self.url()}).all()
+        all_forks = self.query.find({'upstream_repo.name': self.url()}).all()
+        return filter(lambda fork: fork.app_config is not None, all_forks)
 
     def tarball(self, revision, path=None):
         if path: