##// END OF EJS Templates
repos: recover properly from bad extraction of repo_id from URL and DB calls.
super-admin -
r4725:65a9cd36 default
parent child Browse files
Show More
@@ -125,13 +125,15 b' class RepoModel(BaseModel):'
125 :param repo_name:
125 :param repo_name:
126 :return: repo object if matched else None
126 :return: repo object if matched else None
127 """
127 """
128
128 _repo_id = None
129 try:
129 try:
130 _repo_id = self._extract_id_from_repo_name(repo_name)
130 _repo_id = self._extract_id_from_repo_name(repo_name)
131 if _repo_id:
131 if _repo_id:
132 return self.get(_repo_id)
132 return self.get(_repo_id)
133 except Exception:
133 except Exception:
134 log.exception('Failed to extract repo_name from URL')
134 log.exception('Failed to extract repo_name from URL')
135 if _repo_id:
136 Session().rollback()
135
137
136 return None
138 return None
137
139
General Comments 0
You need to be logged in to leave comments. Login now