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

Delete via reference currently requires download first #103

Closed
BSVogler opened this issue Apr 17, 2023 · 4 comments
Closed

Delete via reference currently requires download first #103

BSVogler opened this issue Apr 17, 2023 · 4 comments

Comments

@BSVogler
Copy link
Contributor

BSVogler commented Apr 17, 2023

given a Patient id I want to delete it from the server. This code is required to make it work.

client.reference('Patient', str(userid)).to_resource().delete()

The code above downloads the resource first, although it is not necessary. It would be good to have

client.reference('Patient', str(userid)).delete()

instead.

@BSVogler
Copy link
Contributor Author

Might be related with this #101

@ruscoder
Copy link
Member

@pavlushkin please take a look, it's related to refactoring you're making for conditional operations

@ruscoder
Copy link
Member

ruscoder commented Aug 3, 2024

Will be fixed in 2.0.0 using client.delete('Patient', 'id') or client.delete('Patient/id')

@ruscoder
Copy link
Member

ruscoder commented Aug 3, 2024

Also added helpers for BaseReference to use reference.delete() and reference.patch(**kwargs) as it was requested in the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants