-
Notifications
You must be signed in to change notification settings - Fork 339
Remove unnecessary checks on update with etag #63
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
Conversation
Thanks @andyfangdz. This looks pretty good. Would you be able to provide an integration test for this as well? See |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@hiranya911 Indeed! Here's the integration test. The test passed on my local env. I also took the liberty of bumping a minor version since this change technically does not break anything already working with |
Thanks @andyfangdz for the contribution. |
@hiranya911 Can you do a release for |
@andyfangdz I was waiting to see if we can get #59 also approved, and do a 2.3.0 release sometime next week. I will do a release next week regardless of the status of #59. Sorry about the delay. |
@hiranya911 No worries! Thanks for the fast review 😄. Looking forward to #59! |
This was released today. |
Thanks! |
This PR fixes #62 by removing unnecessary checks in function
_update_with_etag
.Why remove the checks instead of updating the docs?
set()
operation, however, the current code checks the value as if it's anupdate()
operation.Code of
set()
, notice how it doesn't do this check at all and is usingput
liketransaction()
firebase-admin-python/firebase_admin/db.py
Lines 146 to 161 in 99c48ef
Code of
update()
, instead of usingput
, it's usingpatch
. The original author might have borrowed the code from here:firebase-admin-python/firebase_admin/db.py
Lines 186 to 200 in 99c48ef
/cc @alexanderwhatley @hiranya911