hasgeek/hacknight

`sponsor_view` and `sponsor_new` endpoint clashes

Closed this issue · 0 comments

/<profile>/<event>/sponsors/new and /<profile>/<event>/sponsors/<sponsor> clashes for the slug /kracekumar/testurl/sponsors/new

How to reproduce

hacknight git:(issue-223) ✗ ipython -i shell.py
n [1]: m = app.url_map

In [2]: urls = m.bind("example.com", "/")

In [3]: urls.match("/kracekumar/testurl/sponsors/new", "GET")
Out[3]:
('sponsor_view',
 {'event': u'testurl', 'profile': u'kracekumar', 'sponsor': u'new'})

Executing same code after commenting sponsor_view

In [1]: m = app.url_map

In [2]: urls = m.bind("example.com", "/")

In [3]: urls.match("/kracekumar/testurl/sponsors/new", "GET")
Out[3]: ('sponsor_new', {'event': u'testurl', 'profile': u'kracekumar'})