Skip to content

Commit

Permalink
rename ids to include_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgaspar committed Jan 27, 2021
1 parent 6b2053e commit 4c69402
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions superset/views/base_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"properties": {
"page_size": {"type": "integer"},
"page": {"type": "integer"},
"ids": {"type": "array", "items": {"type": "integer"}},
"include_ids": {"type": "array", "items": {"type": "integer"}},
"filter": {"type": "string"},
},
}
Expand Down Expand Up @@ -491,7 +491,7 @@ def related(self, column_name: str, **kwargs: Any) -> FlaskResponse:
result = self._get_result_from_rows(datamodel, rows, column_name)

# If ids are specified make sure we fetch and include them on the response
ids = args.get("ids")
ids = args.get("include_ids")
self._add_extra_ids_to_result(datamodel, column_name, ids, result)

return self.response(200, count=len(result), result=result)
Expand Down
4 changes: 2 additions & 2 deletions tests/base_api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def test_get_ids_related_owners(self):
API: Test get filter related owners
"""
self.login(username="admin")
argument = {"filter": "gamma_sqllab", "ids": [2]}
argument = {"filter": "gamma_sqllab", "include_ids": [2]}
uri = f"api/v1/{self.resource_name}/related/owners?q={prison.dumps(argument)}"

rv = self.client.get(uri)
Expand All @@ -244,7 +244,7 @@ def test_get_repeated_ids_related_owners(self):
API: Test get filter related owners
"""
self.login(username="admin")
argument = {"filter": "gamma_sqllab", "ids": [2, 4]}
argument = {"filter": "gamma_sqllab", "include_ids": [2, 4]}
uri = f"api/v1/{self.resource_name}/related/owners?q={prison.dumps(argument)}"

rv = self.client.get(uri)
Expand Down

0 comments on commit 4c69402

Please sign in to comment.