##// END OF EJS Templates
fix missing c.user reference
marcink -
r2959:db40558e beta
parent child Browse files
Show More
@@ -59,9 +59,7 b' class JournalController(BaseController):'
59 def index(self):
59 def index(self):
60 # Return a rendered template
60 # Return a rendered template
61 p = safe_int(request.params.get('page', 1), 1)
61 p = safe_int(request.params.get('page', 1), 1)
62
63 c.user = User.get(self.rhodecode_user.user_id)
62 c.user = User.get(self.rhodecode_user.user_id)
64
65 c.following = self.sa.query(UserFollowing)\
63 c.following = self.sa.query(UserFollowing)\
66 .filter(UserFollowing.user_id == self.rhodecode_user.user_id)\
64 .filter(UserFollowing.user_id == self.rhodecode_user.user_id)\
67 .options(joinedload(UserFollowing.follows_repository))\
65 .options(joinedload(UserFollowing.follows_repository))\
@@ -70,7 +68,6 b' class JournalController(BaseController):'
70 journal = self._get_journal_data(c.following)
68 journal = self._get_journal_data(c.following)
71
69
72 c.journal_pager = Page(journal, page=p, items_per_page=20)
70 c.journal_pager = Page(journal, page=p, items_per_page=20)
73
74 c.journal_day_aggreagate = self._get_daily_aggregate(c.journal_pager)
71 c.journal_day_aggreagate = self._get_daily_aggregate(c.journal_pager)
75
72
76 c.journal_data = render('journal/journal_data.html')
73 c.journal_data = render('journal/journal_data.html')
@@ -81,6 +78,7 b' class JournalController(BaseController):'
81 @LoginRequired()
78 @LoginRequired()
82 @NotAnonymous()
79 @NotAnonymous()
83 def index_my_repos(self):
80 def index_my_repos(self):
81 c.user = User.get(self.rhodecode_user.user_id)
84 if request.environ.get('HTTP_X_PARTIAL_XHR'):
82 if request.environ.get('HTTP_X_PARTIAL_XHR'):
85 all_repos = self.sa.query(Repository)\
83 all_repos = self.sa.query(Repository)\
86 .filter(Repository.user_id == c.user.user_id)\
84 .filter(Repository.user_id == c.user.user_id)\
General Comments 0
You need to be logged in to leave comments. Login now