Skip to content

Commit

Permalink
Merge 03871fe into ea0f795
Browse files Browse the repository at this point in the history
  • Loading branch information
João Conde committed Mar 29, 2023
2 parents ea0f795 + 03871fe commit 5e2ed0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

*
* Find type in `get_object` for eager parameter as string or array

### Changed

Expand Down
7 changes: 7 additions & 0 deletions src/appier/util.py
Expand Up @@ -112,6 +112,12 @@ def to_sort(sort_s):
values[1] = SORT_MAP.get(direction, 1)
return [tuple(values)]

def to_eager(eager_s):
if not eager_s: return []
eager_t = type(eager_s)
if eager_t == list: return eager_s
return [eager_s]

ALIAS = {
"context" : "find_d",
"filters" : "find_d",
Expand Down Expand Up @@ -139,6 +145,7 @@ def to_sort(sort_s):
find_n = legacy.UNICODE,
find_o = legacy.UNICODE,
sort = to_sort,
eager = to_eager,
meta = bool,
fields = list
)
Expand Down

0 comments on commit 5e2ed0d

Please sign in to comment.