allura
修訂 | d6fc234d7d0e88b0bc8c67537b6d5d694906e7fa (tree) |
---|---|
時間 | 2010-07-20 03:25:20 |
作者 | Jenny Steele <jsteele@geek...> |
Commiter | Jenny Steele |
Fixed a problem that broke user profiles with deleted projects
@@ -259,7 +259,7 @@ class User(MappedClass): | ||
259 | 259 | from .project import Project |
260 | 260 | for p in self.projects: |
261 | 261 | project = Project.query.get(_id=p, deleted=False) |
262 | - if self._id in [role.user_id for role in project.roles] and not project.shortname.startswith('u/'): | |
262 | + if project and self._id in [role.user_id for role in project.roles] and not project.shortname.startswith('u/'): | |
263 | 263 | yield project |
264 | 264 | |
265 | 265 | def role_iter(self): |