Show More
@@ -134,7 +134,8 b' class ReposController(BaseController):' | |||||
134 | repo = repo_model.get(id) |
|
134 | repo = repo_model.get(id) | |
135 | if not repo: |
|
135 | if not repo: | |
136 | h.flash(_('%s repository is not mapped to db perhaps' |
|
136 | h.flash(_('%s repository is not mapped to db perhaps' | |
137 |
' it was moved or renamed |
|
137 | ' it was moved or renamed from the filesystem' | |
|
138 | ' please run the application again' | |||
138 | ' in order to rescan repositories') % id, category='error') |
|
139 | ' in order to rescan repositories') % id, category='error') | |
139 |
|
140 | |||
140 | return redirect(url('repos')) |
|
141 | return redirect(url('repos')) | |
@@ -156,7 +157,14 b' class ReposController(BaseController):' | |||||
156 | """GET /repos/id/edit: Form to edit an existing item""" |
|
157 | """GET /repos/id/edit: Form to edit an existing item""" | |
157 | # url('edit_repo', id=ID) |
|
158 | # url('edit_repo', id=ID) | |
158 | repo_model = RepoModel() |
|
159 | repo_model = RepoModel() | |
159 | c.repo_info = repo_model.get(id) |
|
160 | c.repo_info = repo = repo_model.get(id) | |
|
161 | if not repo: | |||
|
162 | h.flash(_('%s repository is not mapped to db perhaps' | |||
|
163 | ' it was created or renamed from the filesystem' | |||
|
164 | ' please run the application again' | |||
|
165 | ' in order to rescan repositories') % id, category='error') | |||
|
166 | ||||
|
167 | return redirect(url('repos')) | |||
160 | defaults = c.repo_info.__dict__ |
|
168 | defaults = c.repo_info.__dict__ | |
161 | defaults.update({'user':c.repo_info.user.username}) |
|
169 | defaults.update({'user':c.repo_info.user.username}) | |
162 | return htmlfill.render( |
|
170 | return htmlfill.render( |
General Comments 0
You need to be logged in to leave comments.
Login now