Added another tastypie patch
- Legacy-Id: 18411
This commit is contained in:
parent
7a422e86bf
commit
5931b5d778
|
@ -18,3 +18,15 @@
|
|||
|
||||
def obj_get(self, bundle, **kwargs):
|
||||
"""
|
||||
--- tastypie/paginator.py.orig 2020-08-25 15:24:46.391588425 +0200
|
||||
+++ tastypie/paginator.py 2020-08-25 15:24:53.591797122 +0200
|
||||
@@ -128,6 +128,8 @@
|
||||
except (AttributeError, TypeError):
|
||||
# If it's not a QuerySet (or it's ilk), fallback to ``len``.
|
||||
return len(self.objects)
|
||||
+ except ValueError as e:
|
||||
+ raise BadRequest("Invalid resource lookup: %s." % e)
|
||||
|
||||
def get_previous(self, limit, offset):
|
||||
"""
|
||||
|
||||
|
|
Loading…
Reference in a new issue