Show More
@@ -142,7 +142,6 b' class IntegrationSettingsViewBase(object' | |||
|
142 | 142 | permissions=self.request.user.permissions, |
|
143 | 143 | no_scope=not self.admin_view) |
|
144 | 144 | |
|
145 | ||
|
146 | 145 | def _form_defaults(self): |
|
147 | 146 | defaults = {} |
|
148 | 147 | |
@@ -284,7 +283,6 b' class IntegrationSettingsViewBase(object' | |||
|
284 | 283 | child_repos_only=scope['child_repos_only'], |
|
285 | 284 | ) |
|
286 | 285 | |
|
287 | ||
|
288 | 286 | self.integration.settings = valid_data['settings'] |
|
289 | 287 | Session().commit() |
|
290 | 288 | # Display success message and redirect. |
@@ -293,7 +291,6 b' class IntegrationSettingsViewBase(object' | |||
|
293 | 291 | integration_name=self.IntegrationType.display_name), |
|
294 | 292 | queue='success') |
|
295 | 293 | |
|
296 | ||
|
297 | 294 | # if integration scope changes, we must redirect to the right place |
|
298 | 295 | # keeping in mind if the original view was for /repo/ or /_admin/ |
|
299 | 296 | admin_view = not (self.repo or self.repo_group) |
@@ -347,8 +344,8 b' class IntegrationSettingsViewBase(object' | |||
|
347 | 344 | assert sort_field in ('name', 'integration_type', 'enabled', 'scope') |
|
348 | 345 | |
|
349 | 346 | integrations.sort( |
|
350 |
key=lambda x: getattr(x[1], sort_field), |
|
|
351 | ||
|
347 | key=lambda x: getattr(x[1], sort_field), | |
|
348 | reverse=(sort_dir == 'desc')) | |
|
352 | 349 | |
|
353 | 350 | page_url = webhelpers.paginate.PageURL( |
|
354 | 351 | self.request.path, self.request.GET) |
@@ -375,6 +372,7 b' class IntegrationSettingsViewBase(object' | |||
|
375 | 372 | } |
|
376 | 373 | return template_context |
|
377 | 374 | |
|
375 | ||
|
378 | 376 | class GlobalIntegrationsView(IntegrationSettingsViewBase): |
|
379 | 377 | def perm_check(self, user): |
|
380 | 378 | return auth.HasPermissionAll('hg.admin').check_permissions(user=user) |
@@ -135,7 +135,7 b' class IntegrationScopeType(colander.Sche' | |||
|
135 | 135 | return { |
|
136 | 136 | 'repo': repo, |
|
137 | 137 | 'repo_group': None, |
|
138 |
'child_repos_only': |
|
|
138 | 'child_repos_only': False, | |
|
139 | 139 | } |
|
140 | 140 | elif cstruct.startswith('repogroup-recursive:'): |
|
141 | 141 | repo_group = RepoGroup.get_by_group_name(cstruct.split(':')[1]) |
General Comments 0
You need to be logged in to leave comments.
Login now