fix: inbox issue (#4765)

This commit is contained in:
Anmol Singh Bhatia 2024-06-11 17:32:52 +05:30 committed by GitHub
parent b5bbdbfa8e
commit cb292b010f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,7 +112,7 @@ class OffsetPaginator:
else (order_by[1::] if order_by.startswith("-") else order_by,)
)
# Set desc to true when `-` exists in the order by
self.desc = True if order_by.startswith("-") else False
self.desc = True if order_by and order_by.startswith("-") else False
self.queryset = queryset
self.max_limit = max_limit
self.max_offset = max_offset