Skip to content

Commit 4f2f800

Browse files
authored
Merge pull request #456 from Shopify/paulinakhew-fix-issue-426
Fix 'object of type "filter" has no len()' issue in shopify_api.py
2 parents e2fdcab + f2202c7 commit 4f2f800

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
- Added support for Fulfillment.update_tracking ([#432](https://github.com/Shopify/shopify_python_api/pull/432))
22
- Add FulfillmentEvent resource ([#454](https://github.com/Shopify/shopify_python_api/pull/454))
3+
- Fix for being unable to get the len() of a filter ([#456](https://github.com/Shopify/shopify_python_api/pull/456))
34

45
== Version 8.2.0
56
- [Feature] Add support for Dynamic API Versioning. When the library is initialized, it will now make a request to

scripts/shopify_api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ def run_task(cls, task=None, *args):
5252
# Allow unambigious abbreviations of tasks
5353
if task not in cls._tasks:
5454
matches = filter(lambda item: item.startswith(task), cls._tasks)
55-
if len(matches) == 1:
56-
task = matches[0]
55+
list_of_matches = list(matches)
56+
if len(list_of_matches) == 1:
57+
task = list_of_matches[0]
5758
else:
5859
sys.stderr.write('Could not find task "%s".\n' % (task))
5960

0 commit comments

Comments
 (0)