Skip to content

Commit fbd9359

Browse files
author
Izaak Gough
committed
refactor: extract app_id from options
1 parent 724a1bb commit fbd9359

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/firebase_functions/options.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,8 @@ def _endpoint(
655655
def _alert_options_to_firebase_alert_options(
656656
options: EventHandlerOptions,
657657
alert_type: str | AlertType,
658-
app_id: str | None = None,
659658
) -> FirebaseAlertOptions:
659+
app_id = getattr(options, "app_id", None)
660660
option_values = {
661661
field.name: getattr(options, field.name)
662662
for field in _dataclasses.fields(options)
@@ -689,7 +689,6 @@ def _endpoint(
689689
return _alert_options_to_firebase_alert_options(
690690
self,
691691
kwargs["alert_type"],
692-
self.app_id,
693692
)._endpoint(**kwargs)
694693

695694

@@ -713,7 +712,6 @@ def _endpoint(
713712
return _alert_options_to_firebase_alert_options(
714713
self,
715714
kwargs["alert_type"],
716-
self.app_id,
717715
)._endpoint(**kwargs)
718716

719717

@@ -737,7 +735,6 @@ def _endpoint(
737735
return _alert_options_to_firebase_alert_options(
738736
self,
739737
kwargs["alert_type"],
740-
self.app_id,
741738
)._endpoint(**kwargs)
742739

743740

0 commit comments

Comments
 (0)