Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating new labels by posting to the api/v1/labels/ endpoint returns the wrong location. #532

Open
terjekv opened this issue May 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@terjekv
Copy link
Collaborator

terjekv commented May 14, 2024

I'm not sure why this was ever done, but it seems very very broken:

self.lookup_field = 'name'

return request.path + str(serializer.validated_data[self.lookup_field])

The label has a proper ID. Using the label won't work, but we could use

path('labels/name/<name>', views_labels.LabelDetailByName.as_view()),
to look up the label by name... But this isn't the endpoint the Location header points to...

Needs fixing. Badly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant