@@ -201,7 +201,8 @@ def example(event: Event[Change[DocumentSnapshot]]) -> None:
201201 options = FirestoreOptions (** kwargs )
202202
203203 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 ))
205206
206207 @_functools .wraps (func )
207208 def on_document_written_wrapped (raw : _ce .CloudEvent ):
@@ -248,7 +249,8 @@ def example(event: Event[Change[DocumentSnapshot]]) -> None:
248249 options = FirestoreOptions (** kwargs )
249250
250251 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 ))
252254
253255 @_functools .wraps (func )
254256 def on_document_updated_wrapped (raw : _ce .CloudEvent ):
@@ -295,7 +297,8 @@ def example(event: Event[DocumentSnapshot]):
295297 options = FirestoreOptions (** kwargs )
296298
297299 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 ))
299302
300303 @_functools .wraps (func )
301304 def on_document_created_wrapped (raw : _ce .CloudEvent ):
@@ -342,7 +345,8 @@ def example(event: Event[DocumentSnapshot]) -> None:
342345 options = FirestoreOptions (** kwargs )
343346
344347 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 ))
346350
347351 @_functools .wraps (func )
348352 def on_document_deleted_wrapped (raw : _ce .CloudEvent ):
0 commit comments