@@ -201,7 +201,8 @@ def example(event: Event[Change[DocumentSnapshot]]) -> None:
201
201
options = FirestoreOptions (** kwargs )
202
202
203
203
def on_document_written_inner_decorator (func : _C1 ):
204
- document_pattern = _path_pattern .PathPattern (options .document )
204
+ document_pattern = _path_pattern .PathPattern (
205
+ _util .normalize_path (options .document ))
205
206
206
207
@_functools .wraps (func )
207
208
def on_document_written_wrapped (raw : _ce .CloudEvent ):
@@ -248,7 +249,8 @@ def example(event: Event[Change[DocumentSnapshot]]) -> None:
248
249
options = FirestoreOptions (** kwargs )
249
250
250
251
def on_document_updated_inner_decorator (func : _C1 ):
251
- document_pattern = _path_pattern .PathPattern (options .document )
252
+ document_pattern = _path_pattern .PathPattern (
253
+ _util .normalize_path (options .document ))
252
254
253
255
@_functools .wraps (func )
254
256
def on_document_updated_wrapped (raw : _ce .CloudEvent ):
@@ -295,7 +297,8 @@ def example(event: Event[DocumentSnapshot]):
295
297
options = FirestoreOptions (** kwargs )
296
298
297
299
def on_document_created_inner_decorator (func : _C2 ):
298
- document_pattern = _path_pattern .PathPattern (options .document )
300
+ document_pattern = _path_pattern .PathPattern (
301
+ _util .normalize_path (options .document ))
299
302
300
303
@_functools .wraps (func )
301
304
def on_document_created_wrapped (raw : _ce .CloudEvent ):
@@ -342,7 +345,8 @@ def example(event: Event[DocumentSnapshot]) -> None:
342
345
options = FirestoreOptions (** kwargs )
343
346
344
347
def on_document_deleted_inner_decorator (func : _C2 ):
345
- document_pattern = _path_pattern .PathPattern (options .document )
348
+ document_pattern = _path_pattern .PathPattern (
349
+ _util .normalize_path (options .document ))
346
350
347
351
@_functools .wraps (func )
348
352
def on_document_deleted_wrapped (raw : _ce .CloudEvent ):
0 commit comments