Skip to content

Commit 0a91791

Browse files
vaibhavatlanAryamanz29
authored andcommitted
Added query params in workflow request
1 parent 7f957df commit 0a91791

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pyatlan/model/workflow.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,17 @@ def __init__(__pydantic_self__, **data: Any) -> None:
215215
["from_", "size", "track_total_hits", "sort"]
216216
)
217217

218+
@property
219+
def query_params(self) -> dict:
220+
qp: Dict[str, object] = {}
221+
if self.post_filter:
222+
qp["filter"] = self.post_filter
223+
if self.sort:
224+
qp["sort"] = self.sort
225+
qp["from_"] = self.from_
226+
qp["size"] = self.size
227+
return qp
228+
218229

219230
class WorkflowSearchResponse(AtlanObject):
220231
_size: int = PrivateAttr()
@@ -248,7 +259,7 @@ def _get_next_page(self):
248259
self._criteria.size = self._size
249260
raw_json = self._client._call_api(
250261
api=self._endpoint.format_path_with_params(),
251-
query_params=self._criteria,
262+
query_params=self._criteria.query_params,
252263
)
253264
if not raw_json.get("records"):
254265
self.records = []

0 commit comments

Comments
 (0)