Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into feat/integration-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
exaby73 committed Jul 21, 2024
2 parents 1dba352 + db1eb6c commit 1ed8fee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/firebase_functions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
Firebase Functions for Python.
"""

__version__ = "0.4.1"
__version__ = "0.4.2"
13 changes: 9 additions & 4 deletions src/firebase_functions/firestore_fn.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,18 @@ def _firestore_endpoint_handler(
firestore_event_data.old_value.create_time,
firestore_event_data.old_value.update_time,
)
if event_type == _event_type_deleted:

if event_type in (_event_type_deleted,
_event_type_deleted_with_auth_context):
firestore_event_data = _typing.cast(_firestore.DocumentEventData,
old_value_snapshot)
if event_type == _event_type_created:
if event_type in (_event_type_created,
_event_type_created_with_auth_context):
firestore_event_data = _typing.cast(_firestore.DocumentEventData,
value_snapshot)
if event_type in (_event_type_written, _event_type_updated):
if event_type in (_event_type_written, _event_type_updated,
_event_type_written_with_auth_context,
_event_type_updated_with_auth_context):
firestore_event_data = _typing.cast(
_firestore.DocumentEventData,
Change(
Expand Down Expand Up @@ -306,7 +311,7 @@ def on_document_written_with_auth_context_wrapped(raw: _ce.CloudEvent):
_util.set_func_endpoint_attr(
on_document_written_with_auth_context_wrapped,
options._endpoint(
event_type=_event_type_written,
event_type=_event_type_written_with_auth_context,
func_name=func.__name__,
document_pattern=document_pattern,
),
Expand Down

0 comments on commit 1ed8fee

Please sign in to comment.