django-tastypie-nonrel icon indicating copy to clipboard operation
django-tastypie-nonrel copied to clipboard

Subresource PK is being set to its index

Open andresdouglas opened this issue 13 years ago • 1 comments

Instead of creating resource_uri's of the form: /api/v1/list/4e58386f66d8cd50380000f9/items/1/ It's creating resource_uris for subresources of the form

/api/v1/list/0/items/0/

/api/v1/list/1/items/1/

andresdouglas avatar Aug 27 '11 00:08 andresdouglas

If that is in deed a bug, switching around the if/else comparison would fix it? https://github.com/andresdouglas/django-tastypie-nonrel/blob/master/tastypie_nonrel/resources.py#L169-173

andresdouglas avatar Aug 29 '11 05:08 andresdouglas