Changeset - ddaddffcb7dc
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 15 years ago 2010-11-22 19:00:11
marcin@python-works.com
added limit for user journal
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/journal.py
Show inline comments
 
@@ -52,24 +52,25 @@ class JournalController(BaseController):
 
        
 
        repo_ids = [x.follows_repository.repo_id for x in c.following 
 
                    if x.follows_repository is not None]
 
        user_ids = [x.follows_user.user_id for x in c.following 
 
                    if x.follows_user is not None]
 
        
 
        c.journal = self.sa.query(UserLog)\
 
            .filter(or_(
 
                        UserLog.repository_id.in_(repo_ids),
 
                        UserLog.user_id.in_(user_ids),
 
                        ))\
 
            .order_by(UserLog.action_date.desc())\
 
            .limit(20)\
 
            .all()
 
        return render('/journal.html')
 

	
 

	
 
    def toggle_following(self):
 

	
 
        if request.POST.get('auth_token') == get_token():
 
            scm_model = ScmModel()
 

	
 
            user_id = request.POST.get('follows_user_id')
 
            if user_id:
 
                try:
0 comments (0 inline, 0 general)