Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit b7f2c76

Browse files
committed
Fixed allowed types for group_sort
1 parent ef163a7 commit b7f2c76

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cloudant/_common_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
'drilldown': list,
121121
'group_field': STRTYPE,
122122
'group_limit': (int, NONETYPE),
123-
'group_sort': list,
123+
'group_sort': (STRTYPE, list),
124124
'include_docs': bool,
125125
'limit': (int, NONETYPE),
126126
'query': (STRTYPE, int),

tests/unit/database_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ def test_get_search_result_with_invalid_value_types(self):
12171217
{'drilldown': 'blah'}, # Should be a list
12181218
{'group_field': ['blah']}, # Should be a STRTYPE
12191219
{'group_limit': 'int'}, # Should be an int
1220-
{'group_sort': 'blah'}, # Should be a list
1220+
{'group_sort': 3}, # Should be a STRTYPE or list
12211221
{'include_docs': 'blah'}, # Should be a boolean
12221222
{'limit': 'blah'}, # Should be an int
12231223
{'ranges': 1}, # Should be a dict

0 commit comments

Comments
 (0)