summaryrefslogtreecommitdiff
path: root/patchwork/urls.py
diff options
context:
space:
mode:
authorVeronika Kabatova <vkabatov@redhat.com>2018-05-03 12:55:16 +0200
committerStephen Finucane <stephen@that.guru>2018-05-03 15:23:49 +0100
commit8d6cc05082cf8fee84932e1e683382824e9b1c28 (patch)
tree8eea5e4e7f8dca3e19fceb42aa1d407a7cb7dc39 /patchwork/urls.py
parentd2eb1f6d20835713c9560bd55abf6d6da0b91ce2 (diff)
downloadpatchwork-8d6cc05082cf8fee84932e1e683382824e9b1c28.tar
patchwork-8d6cc05082cf8fee84932e1e683382824e9b1c28.tar.gz
Explicitly distinguish between comments on patch and cover
reverse() gets confused when the same view name and kwargs are passed to it, ignoring what endpoint the request originated from. Fix this by using different view names for cover letter and patch comments views. Reported-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Veronika Kabatova <vkabatov@redhat.com> Reviewed-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'patchwork/urls.py')
-rw-r--r--patchwork/urls.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/patchwork/urls.py b/patchwork/urls.py
index 1dc4ffc..e90de6b 100644
--- a/patchwork/urls.py
+++ b/patchwork/urls.py
@@ -283,10 +283,10 @@ if settings.ENABLE_REST_API:
api_1_1_patterns = [
url(r'^patches/(?P<pk>[^/]+)/comments/$',
api_comment_views.CommentList.as_view(),
- name='api-comment-list'),
+ name='api-patch-comment-list'),
url(r'^covers/(?P<pk>[^/]+)/comments/$',
api_comment_views.CommentList.as_view(),
- name='api-comment-list'),
+ name='api-cover-comment-list'),
]
urlpatterns += [