Skip to content

Commit 216be71

Browse files
committed
fix: more
1 parent 606a738 commit 216be71

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

templates/python/search_helpers.mustache

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,13 @@
219219
{{^isSyncClient}}async {{/isSyncClient}}def generate_secured_api_key(
220220
self,
221221
parent_api_key: str,
222-
restrictions: Optional[Union[dict, SecuredApiKeyRestrictions]] = SecuredApiKeyRestrictions(),
222+
restrictions: Optional[Union[dict, SecuredApiKeyRestrictions]] = None,
223223
) -> str:
224224
"""
225225
Helper: Generates a secured API key based on the given `parent_api_key` and given `restrictions`.
226226
"""
227+
if restrictions is None:
228+
restrictions = SecuredApiKeyRestrictions()
227229
restrictions_dict = {}
228230
if isinstance(restrictions, SecuredApiKeyRestrictions):
229231
restrictions_dict = restrictions.to_dict()

0 commit comments

Comments
 (0)