##// END OF EJS Templates
fix reset statistics call if there are no statistics yet
marcink -
r3314:059efaea beta
parent child Browse files
Show More
@@ -602,12 +602,12 b' class RepoModel(BaseModel):'
602
602
603 :param repo_name:
603 :param repo_name:
604 """
604 """
605 repo = self._get_repo(repo_name)
605 try:
606 try:
606 obj = self.sa.query(Statistics)\
607 obj = self.sa.query(Statistics)\
607 .filter(Statistics.repository ==
608 .filter(Statistics.repository == repo).scalar()
608 self.get_by_repo_name(repo_name))\
609 if obj:
609 .one()
610 self.sa.delete(obj)
610 self.sa.delete(obj)
611 except:
611 except:
612 log.error(traceback.format_exc())
612 log.error(traceback.format_exc())
613 raise
613 raise
General Comments 0
You need to be logged in to leave comments. Login now