From 50380c00619e284a929a73ad86d950243a9507e6 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 13 2017 11:02:17 +0000 Subject: [PATCH 1/2] Do not change the privacy status of an issue unless one is specified This is trigger for example when a PR closes an issue, since no private flag is specified it was resetting the privacy status while it shouldn't. This commit fixes this. --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 8fd0df6..a4d2b42 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -1582,7 +1582,7 @@ def new_tag(session, tag_name, tag_description, tag_color, project_id): def edit_issue(session, issue, ticketfolder, user, repo=None, title=None, content=None, status=None, close_status=-1, - priority=-1, milestone=-1, private=False): + priority=-1, milestone=-1, private=None): ''' Edit the specified issue. ''' user_obj = get_user(session, user) From 1f309a6179cac233c7146c86a2e0ff33a4012bf9 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 13 2017 11:50:02 +0000 Subject: [PATCH 2/2] Drop un-needed tests, it's not really testing anything --- diff --git a/tests/test_pagure_flask_ui_repo.py b/tests/test_pagure_flask_ui_repo.py index c6336a1..95f3784 100644 --- a/tests/test_pagure_flask_ui_repo.py +++ b/tests/test_pagure_flask_ui_repo.py @@ -4099,12 +4099,9 @@ index 0000000..fb7093d data = { 'csrf_token':csrf_token } - output = self.app.post( - '/watch', data=data, follow_redirects=True) - self.assertEqual(output.status_code, 404) output = self.app.post( - '/foo/watch/settings', data=data, follow_redirects=True) + '/foo/watch/settings/1', data=data, follow_redirects=True) self.assertEqual(output.status_code, 404) output = self.app.post(