allow empty data for paginate
This commit is contained in:
parent
60f1809ed8
commit
918a04c502
|
@ -127,6 +127,9 @@ class IndexPaginate:
|
|||
|
||||
def validate_data(self):
|
||||
"""add pit and size to data"""
|
||||
if not self.data:
|
||||
self.data = {}
|
||||
|
||||
if "sort" not in self.data.keys():
|
||||
self.data.update({"sort": [{"_doc": {"order": "desc"}}]})
|
||||
|
||||
|
|
Loading…
Reference in New Issue