From 8d6cc05082cf8fee84932e1e683382824e9b1c28 Mon Sep 17 00:00:00 2001 From: Veronika Kabatova Date: Thu, 3 May 2018 12:55:16 +0200 Subject: 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 Signed-off-by: Veronika Kabatova Reviewed-by: Stephen Finucane --- patchwork/urls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'patchwork/urls.py') 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[^/]+)/comments/$', api_comment_views.CommentList.as_view(), - name='api-comment-list'), + name='api-patch-comment-list'), url(r'^covers/(?P[^/]+)/comments/$', api_comment_views.CommentList.as_view(), - name='api-comment-list'), + name='api-cover-comment-list'), ] urlpatterns += [ -- cgit v1.2.3