Skip to content

Commit ee10b63

Browse files
authored
Watch Queries should include documents in parent path on V1 (#7636)
1 parent f41dc4f commit ee10b63

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

firestore/google/cloud/firestore_v1/watch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ def for_query(
352352
cls, query, snapshot_callback, snapshot_class_instance, reference_class_instance
353353
):
354354
query_target = firestore_pb2.Target.QueryTarget(
355-
parent=query._client._database_string, structured_query=query._to_protobuf()
355+
parent=query._client._database_string + "/documents",
356+
structured_query=query._to_protobuf(),
356357
)
357358

358359
return cls(

firestore/tests/system.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from google.api_core.exceptions import NotFound
3030
from google.cloud._helpers import _pb_timestamp_to_datetime
3131
from google.cloud._helpers import UTC
32-
from google.cloud import firestore
32+
from google.cloud import firestore_v1 as firestore
3333
from test_utils.system import unique_resource_id
3434

3535
from time import sleep

0 commit comments

Comments
 (0)