From 78532ed9789e2815dd22be99f558675258816c11 Mon Sep 17 00:00:00 2001 From: Lova Andriarimalala <43842786+Xpirix@users.noreply.github.com> Date: Fri, 15 Nov 2024 09:02:14 +0300 Subject: [PATCH] Feedback resubmission fix --- qgis-app/plugins/tests/test_plugin_version_feedback.py | 4 ++-- qgis-app/plugins/views.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/qgis-app/plugins/tests/test_plugin_version_feedback.py b/qgis-app/plugins/tests/test_plugin_version_feedback.py index 278454ac..1a90a48e 100644 --- a/qgis-app/plugins/tests/test_plugin_version_feedback.py +++ b/qgis-app/plugins/tests/test_plugin_version_feedback.py @@ -331,7 +331,7 @@ def test_post_create_single_task_feedback(self): "feedback": "single line feedback" } ) - self.assertEqual(response.status_code, 200) + self.assertEqual(response.status_code, 302) feedbacks = PluginVersionFeedback.objects.filter( version=self.version_2).all() self.assertEqual(len(feedbacks), 1) @@ -345,7 +345,7 @@ def test_post_create_multiple_task_feedback(self): "feedback": "- [ ] task one\n - [ ] task two" } ) - self.assertEqual(response.status_code, 200) + self.assertEqual(response.status_code, 302) feedbacks = PluginVersionFeedback.objects.filter( version=self.version_2).all() self.assertEqual(len(feedbacks), 2) diff --git a/qgis-app/plugins/views.py b/qgis-app/plugins/views.py index 23260f1f..3c7d1a12 100644 --- a/qgis-app/plugins/views.py +++ b/qgis-app/plugins/views.py @@ -1449,6 +1449,10 @@ def version_feedback(request, package_name, version): task=task ) version_feedback_notify(version, request.user) + return HttpResponseRedirect( + reverse('version_feedback', + args=[package_name, version.version]) + ) form = VersionFeedbackForm() feedbacks = PluginVersionFeedback.objects.filter(version=version) return render(