Changeset - 059efaea23d6
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2013-02-03 23:29:59
marcin@python-works.com
fix reset statistics call if there are no statistics yet
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/repo.py
Show inline comments
 
@@ -599,17 +599,17 @@ class RepoModel(BaseModel):
 
    def delete_stats(self, repo_name):
 
        """
 
        removes stats for given repo
 

	
 
        :param repo_name:
 
        """
 
        repo = self._get_repo(repo_name)
 
        try:
 
            obj = self.sa.query(Statistics)\
 
                    .filter(Statistics.repository ==
 
                            self.get_by_repo_name(repo_name))\
 
                    .one()
 
                    .filter(Statistics.repository == repo).scalar()
 
            if obj:
 
            self.sa.delete(obj)
 
        except:
 
            log.error(traceback.format_exc())
 
            raise
 

	
 
    def __create_repo(self, repo_name, alias, parent, clone_uri=False):
0 comments (0 inline, 0 general)