Created
October 12, 2018 17:17
-
-
Save mcdonc/dfede0fbdba5f987727ee4afc75a35be to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/firestore/google/cloud/firestore_v1beta1/watch.py b/firestore/google/cloud/firestore_v1beta1/watch.py | |
index bc2b237bc1..a11313d6c3 100644 | |
--- a/firestore/google/cloud/firestore_v1beta1/watch.py | |
+++ b/firestore/google/cloud/firestore_v1beta1/watch.py | |
@@ -619,10 +619,10 @@ class Watch(object): | |
assert name in updated_map, 'Document to delete does not exist' | |
old_document = updated_map.get(name) | |
# XXX probably should not expose IndexError when doc doesnt exist | |
- existing = updated_tree.find(old_document) | |
+ existing = updated_tree.find(name) | |
old_index = existing.index | |
# TODO: was existing.remove returning tree (presumably immuatable?) | |
- updated_tree = updated_tree.remove(old_document) | |
+ updated_tree = updated_tree.remove(name) | |
del updated_map[name] | |
return (DocumentChange(ChangeType.REMOVED, | |
old_document, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment