Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/apify_client/_resource_clients/_resource_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ def __init__(
"""
if resource_path.endswith('/'):
raise ValueError('resource_path must not end with "/"')
if resource_id is not None and resource_id == '':
raise ValueError('resource_id must not be an empty string')

self._base_url = base_url
self._api_base_url = api_base_url or base_url
Expand Down
4 changes: 2 additions & 2 deletions src/apify_client/_resource_clients/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(
**kwargs: Any,
) -> None:
super().__init__(
resource_id=resource_id or 'me',
resource_id='me' if resource_id is None else resource_id,
resource_path=resource_path,
**kwargs,
)
Expand Down Expand Up @@ -170,7 +170,7 @@ def __init__(
**kwargs: Any,
) -> None:
super().__init__(
resource_id=resource_id or 'me',
resource_id='me' if resource_id is None else resource_id,
resource_path=resource_path,
**kwargs,
)
Expand Down