Skip to content

Commit

Permalink
Merge pull request #31 from Xpirix/form_resubmission
Browse files Browse the repository at this point in the history
Feedback resubmission fix
  • Loading branch information
Xpirix authored Nov 15, 2024
2 parents db7366b + 78532ed commit e0ed7f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qgis-app/plugins/tests/test_plugin_version_feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions qgis-app/plugins/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit e0ed7f1

Please sign in to comment.