Closed
Bug 918035
Opened 11 years ago
Closed 11 years ago
Custom routes do not accept slugs
Categories
(Marketplace Graveyard :: API, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
2013-12-10
People
(Reporter: basta, Assigned: mat)
Details
https://marketplace-dev.allizom.org/api/v1/rocketfuel/collections/sssss/curators/
The API 500s both with and without a token.
Reporter | ||
Comment 1•11 years ago
|
||
Updating the summary with new information
Summary: Collection curators API returning 500 on -dev → Collection curators API returning 500 on -dev when a session cookie exists
Comment 2•11 years ago
|
||
Summary: Collection curators API returning 500 on -dev when a session cookie exists → Collection curators API returning 500 on -dev
Comment 3•11 years ago
|
||
So, there are two problems here:
1) In the CollectionViewSet().curators() route, we don't accept slug as a keyword argument. This is a problem, as SlugOrIDMixin works by converting the `pk` keyword argument to a slug before it's handed off to a router. This is an easy fix.
2) We can't write a fix to verify this fix, as it would require us to reverse the slugged URL. Since :cvan nuked SlugRouter in favor of the vastly simpler SlugOrIDMixin, there are no URL patterns with the name slug, so it's not reversible.
My prescription:
1) For the interim, rocketfuel can use IDs instead of slugs.
2) We reinstate SlugRouter.
3) We ensure that all custom routes (e.g. those using @link or @action) accept the `slug` keyword, and write tests allowing slugs to be accepted.
This is a lower priority than all the basic collection-related work.
OS: Mac OS X → All
Priority: -- → P3
Hardware: x86 → All
Summary: Collection curators API returning 500 on -dev → Custom routes do not accept slugs
Reporter | ||
Comment 4•11 years ago
|
||
This won't mean changing *all* of the slugs to ids, just the curator ones...right?
Comment 5•11 years ago
|
||
Correct. That's the only place in Zamboni where we use custom routes.
Assignee | ||
Comment 6•11 years ago
|
||
Testing using cURL locally, I can't reproduce this. Did we fix it by accident ? :)
Basta: was rocketfuel ever changed to use IDs like chuck suggested? Does it work for you with slugs now ?
Flags: needinfo?(mattbasta)
Reporter | ||
Comment 7•11 years ago
|
||
When this bug was filed, I just switched over to IDs for everything that might have needed them.
Flags: needinfo?(mattbasta)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → mpillard
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 8•11 years ago
|
||
Fixed in https://github.com/mozilla/zamboni/commit/9bd177fcbb3d8c4d647247b88d49090f529c5bad
STR:
- This affects all the collections APIs, so make sure curation tool still work correctly, including adding and removing apps, adding and removing curators.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•11 years ago
|
Target Milestone: --- → 2013-12-10
Comment 9•11 years ago
|
||
Note that bug 947210 may interfere with testing this bug.
Comment 10•11 years ago
|
||
I will verify when bug 947210 will be solved .
You need to log in
before you can comment on or make changes to this bug.
Description
•