You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 15, 2023. It is now read-only.
I tried using OrderBy in query to sort the list based on ID in descending order, but it still pulls data in ascending order. Am I doing something wrong?
the code I used is as below:
query = {"OrderBy":[("ID","DESCENDING")]}
print(list_items = my_list.get_list_items(query=query, row_limit=100))
I also checked list.py file in the code package, and I didn't see there any code lines related to OrderBy.
The file has if "Where" in query part, but it doesn't has anything for OrderBy.
Am I missing something here?
The text was updated successfully, but these errors were encountered:
I found the solution for it. I edited the list.py and added the below lines to it just below the "Where" part of code (at line 248)
If "OrderBy" in query:
modified_query["OrderBy"] = query["OrderBy"]
This should fix the problem. Be careful of the indentation. This should be at same level as the previous if "Where" in query: condition for it to work properly.
Let me know if it works.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I tried using OrderBy in query to sort the list based on ID in descending order, but it still pulls data in ascending order. Am I doing something wrong?
the code I used is as below:
query = {"OrderBy":[("ID","DESCENDING")]}
print(list_items = my_list.get_list_items(query=query, row_limit=100))
I also checked list.py file in the code package, and I didn't see there any code lines related to OrderBy.
The file has if "Where" in query part, but it doesn't has anything for OrderBy.
Am I missing something here?
The text was updated successfully, but these errors were encountered: