Show More
@@ -266,12 +266,14 b' class ReposController(BaseController):' | |||
|
266 | 266 | # url('edit_repo', repo_name=ID) |
|
267 | 267 | repo_model = RepoModel() |
|
268 | 268 | c.repo_info = repo_model.get_by_repo_name(repo_name) |
|
269 | r = ScmModel().get(repo_name) | |
|
270 | ||
|
269 | 271 | if c.repo_info.stats: |
|
270 | 272 | last_rev = c.repo_info.stats.stat_on_revision |
|
271 | 273 | else: |
|
272 | 274 | last_rev = 0 |
|
273 | 275 | c.stats_revision = last_rev |
|
274 | r = ScmModel().get(repo_name) | |
|
276 | ||
|
275 | 277 | c.repo_last_rev = r.revisions[-1] if r.revisions else 0 |
|
276 | 278 | |
|
277 | 279 | if last_rev == 0: |
@@ -280,7 +282,6 b' class ReposController(BaseController):' | |||
|
280 | 282 | c.stats_percentage = '%.2f' % ((float((last_rev)) / |
|
281 | 283 | c.repo_last_rev) * 100) |
|
282 | 284 | |
|
283 | ||
|
284 | 285 | if not c.repo_info: |
|
285 | 286 | h.flash(_('%s repository is not mapped to db perhaps' |
|
286 | 287 | ' it was created or renamed from the filesystem' |
@@ -290,7 +291,7 b' class ReposController(BaseController):' | |||
|
290 | 291 | |
|
291 | 292 | return redirect(url('repos')) |
|
292 | 293 | |
|
293 | defaults = c.repo_info.__dict__ | |
|
294 | defaults = c.repo_info.__dict__.copy() | |
|
294 | 295 | if c.repo_info.user: |
|
295 | 296 | defaults.update({'user':c.repo_info.user.username}) |
|
296 | 297 | else: |
@@ -258,7 +258,7 b' class SettingsController(BaseController)' | |||
|
258 | 258 | " crucial for entire application"), category='warning') |
|
259 | 259 | return redirect(url('users')) |
|
260 | 260 | |
|
261 | defaults = c.user.__dict__ | |
|
261 | defaults = c.user.__dict__.copy() | |
|
262 | 262 | return htmlfill.render( |
|
263 | 263 | render('admin/users/user_edit_my_account.html'), |
|
264 | 264 | defaults=defaults, |
@@ -158,7 +158,7 b' class UsersController(BaseController):' | |||
|
158 | 158 | h.flash(_("You can't edit this user"), category='warning') |
|
159 | 159 | return redirect(url('users')) |
|
160 | 160 | |
|
161 | defaults = c.user.__dict__ | |
|
161 | defaults = c.user.__dict__.copy() | |
|
162 | 162 | return htmlfill.render( |
|
163 | 163 | render('admin/users/user_edit.html'), |
|
164 | 164 | defaults=defaults, |
@@ -56,7 +56,7 b' class SettingsController(BaseController)' | |||
|
56 | 56 | category='error') |
|
57 | 57 | |
|
58 | 58 | return redirect(url('home')) |
|
59 | defaults = c.repo_info.__dict__ | |
|
59 | defaults = c.repo_info.__dict__.copy() | |
|
60 | 60 | defaults.update({'user':c.repo_info.user.username}) |
|
61 | 61 | c.users_array = repo_model.get_users_js() |
|
62 | 62 |
General Comments 0
You need to be logged in to leave comments.
Login now