Skip to content

_full_url breaks URL params in save #44

@gaconnet

Description

@gaconnet
class Fish(ResourceModel):
    token = fields.Field(resource_id=True)

I did this in the console and was pleased:

>>> f = Fish(token='t')
>>> f.save(filet=True)
PUT http://localhost:8000/fish/t/?filet=True

Then I did it this way and was confused:

>>> f = Fish.objects.lookup(token='t')
>>> f.save(filet=True)
PUT http://localhost:8000/fish/t/

Notice how the URL param is gone, as if I passed nothing to save()?

This seems to fix it, but I'd prefer for it to use save kwargs without having to do this:

>>> f = Fish.objects.lookup(token='t')
>>> del f._full_url
>>> f.save(filet=True)
PUT http://localhost:8000/fish/t/?filet=True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions