diff --git a/rhodecode/integrations/views.py b/rhodecode/integrations/views.py --- a/rhodecode/integrations/views.py +++ b/rhodecode/integrations/views.py @@ -142,7 +142,6 @@ class IntegrationSettingsViewBase(object permissions=self.request.user.permissions, no_scope=not self.admin_view) - def _form_defaults(self): defaults = {} @@ -284,7 +283,6 @@ class IntegrationSettingsViewBase(object child_repos_only=scope['child_repos_only'], ) - self.integration.settings = valid_data['settings'] Session().commit() # Display success message and redirect. @@ -293,7 +291,6 @@ class IntegrationSettingsViewBase(object integration_name=self.IntegrationType.display_name), queue='success') - # if integration scope changes, we must redirect to the right place # keeping in mind if the original view was for /repo/ or /_admin/ admin_view = not (self.repo or self.repo_group) @@ -347,8 +344,8 @@ class IntegrationSettingsViewBase(object assert sort_field in ('name', 'integration_type', 'enabled', 'scope') integrations.sort( - key=lambda x: getattr(x[1], sort_field), reverse=(sort_dir=='desc')) - + key=lambda x: getattr(x[1], sort_field), + reverse=(sort_dir == 'desc')) page_url = webhelpers.paginate.PageURL( self.request.path, self.request.GET) @@ -375,6 +372,7 @@ class IntegrationSettingsViewBase(object } return template_context + class GlobalIntegrationsView(IntegrationSettingsViewBase): def perm_check(self, user): return auth.HasPermissionAll('hg.admin').check_permissions(user=user) diff --git a/rhodecode/model/validation_schema/schemas/integration_schema.py b/rhodecode/model/validation_schema/schemas/integration_schema.py --- a/rhodecode/model/validation_schema/schemas/integration_schema.py +++ b/rhodecode/model/validation_schema/schemas/integration_schema.py @@ -135,7 +135,7 @@ class IntegrationScopeType(colander.Sche return { 'repo': repo, 'repo_group': None, - 'child_repos_only': None, + 'child_repos_only': False, } elif cstruct.startswith('repogroup-recursive:'): repo_group = RepoGroup.get_by_group_name(cstruct.split(':')[1]) diff --git a/rhodecode/tests/models/schemas/test_integration_schema.py b/rhodecode/tests/models/schemas/test_integration_schema.py --- a/rhodecode/tests/models/schemas/test_integration_schema.py +++ b/rhodecode/tests/models/schemas/test_integration_schema.py @@ -47,7 +47,7 @@ class TestIntegrationSchema(object): ( 'repo:%s' % repo.repo_name, { - 'child_repos_only': None, + 'child_repos_only': False, 'repo_group': None, 'repo': repo, },