Skip to content

Commit

Permalink
fix media query request
Browse files Browse the repository at this point in the history
Signed-off-by: Igor-Davidyuk <[email protected]>
  • Loading branch information
igor-davidyuk committed Aug 21, 2024
1 parent 29680f5 commit 785d531
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions geti_sdk/rest_clients/media_client/media_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def _get_all(self, dataset: Optional[Dataset] = None) -> MediaList[MediaTypeVar]
if dataset is None:
dataset = self._project.training_dataset

url = f"{self._base_url}/{dataset.id}/media:query?top=500"
url = f"{self._base_url}/{dataset.id}/media:query?limit=100"
data = {
"condition": "and",
"rules": [
Expand All @@ -131,7 +131,8 @@ def _get_all(self, dataset: Optional[Dataset] = None) -> MediaList[MediaTypeVar]
if "next_page" in response.keys():
response = self.session.get_rest_response(
url=response["next_page"],
method="GET",
method="POST",
data=data,
include_organization_id=False,
)
return MediaList.from_rest_list(
Expand Down

0 comments on commit 785d531

Please sign in to comment.