changeset 7323:4707d09d49a6

repos: make edit_permissions_revoke controller return an actual (empty) body on success The code 204 was slightly confusing even though technically OK.
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 04 Jun 2018 14:26:37 +0200
parents 1d5145d52c30
children a6927fb86fa9
files kallithea/controllers/admin/repos.py kallithea/tests/functional/test_admin_permissions.py
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/admin/repos.py	Thu Jun 07 01:48:15 2018 +0200
+++ b/kallithea/controllers/admin/repos.py	Mon Jun 04 14:26:37 2018 +0200
@@ -355,6 +355,7 @@
             h.flash(_('An error occurred during revoking of permission'),
                     category='error')
             raise HTTPInternalServerError()
+        return []
 
     @HasRepoPermissionLevelDecorator('admin')
     def edit_fields(self, repo_name):
--- a/kallithea/tests/functional/test_admin_permissions.py	Thu Jun 07 01:48:15 2018 +0200
+++ b/kallithea/tests/functional/test_admin_permissions.py	Mon Jun 04 14:26:37 2018 +0200
@@ -125,5 +125,5 @@
                 obj_type='user',
                 user_id=user.user_id,
                 _authentication_token=self.authentication_token()),
-            status=204) # success has no content
+            status=200)
         assert not response.body