Skip to content

Commit 790fe2e

Browse files
committed
fix: Off by one assertion for invoker property
1 parent db1eb6c commit 790fe2e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/firebase_functions/options.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ def _asdict_with_global_options(self) -> dict:
321321
merged_options: dict = {**global_options, **provider_options}
322322

323323
if self.labels is not None and _GLOBAL_OPTIONS.labels is not None:
324-
merged_options["labels"] = {**_GLOBAL_OPTIONS.labels, **self.labels}
324+
merged_options["labels"] = {
325+
**_GLOBAL_OPTIONS.labels, **self.labels}
325326
if "labels" not in merged_options:
326327
merged_options["labels"] = {}
327328
preserve_external_changes: bool = merged_options.get(
@@ -464,7 +465,7 @@ def _endpoint(
464465
_manifest.TaskQueueTrigger(
465466
rateLimits=rate_limits,
466467
retryConfig=retry_config,
467-
),
468+
),
468469
}
469470
return _manifest.ManifestEndpoint(
470471
**_typing.cast(_typing.Dict, kwargs_merged))
@@ -853,7 +854,7 @@ def _endpoint(
853854
schedule=self.schedule,
854855
timeZone=time_zone,
855856
retryConfig=retry_config,
856-
),
857+
),
857858
}
858859
return _manifest.ManifestEndpoint(
859860
**_typing.cast(_typing.Dict, kwargs_merged))
@@ -1134,7 +1135,7 @@ def _endpoint(
11341135
invoker = [invoker]
11351136
assert len(
11361137
invoker
1137-
) > 1, "HttpsOptions: Invalid option for invoker - must be a non-empty list."
1138+
) >= 1, "HttpsOptions: Invalid option for invoker - must be a non-empty list."
11381139
assert "" not in invoker, (
11391140
"HttpsOptions: Invalid option for invoker - must be a non-empty string."
11401141
)

0 commit comments

Comments
 (0)