Added another tastypie patch

- Legacy-Id: 18411
This commit is contained in:
Henrik Levkowetz 2020-08-25 13:30:01 +00:00
parent 7a422e86bf
commit 5931b5d778

View file

@ -18,3 +18,15 @@
def obj_get(self, bundle, **kwargs): 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):
"""