You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2012/12/11 21:18:48 UTC

git commit: don't cause a fatal error to occur if failing to create/fetch a user-project for icon purposes

Updated Branches:
  refs/heads/master 5d1ffe093 -> 1f7714426


don't cause a fatal error to occur if failing to create/fetch a user-project for icon purposes


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

Branch: refs/heads/master
Commit: 1f771442609cfa4356c30dc71f7d82882e45a594
Parents: 5d1ffe0
Author: Dave Brondsema <db...@geek.net>
Authored: Tue Dec 11 20:18:30 2012 +0000
Committer: Dave Brondsema <db...@geek.net>
Committed: Tue Dec 11 20:18:30 2012 +0000

----------------------------------------------------------------------
 Allura/allura/model/auth.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1f771442/Allura/allura/model/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index b9b11d5..d676e74 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -481,7 +481,11 @@ class User(MappedClass, ActivityNode, ActivityObject):
     @memoize
     def icon_url(self):
         icon_url = None
-        private_project = self.private_project()
+        try:
+            private_project = self.private_project()
+        except:
+            log.warn('Error getting/creating user-project for %s', self.username, exc_info=True)
+            private_project = None
         if private_project and private_project.icon:
             icon_url = self.url()+'user_icon'
         elif self.preferences.email_address: