diff --git a/patch/tastypie-django22-fielderror-response.patch b/patch/tastypie-django22-fielderror-response.patch index 5443ce65f..bb4decd75 100644 --- a/patch/tastypie-django22-fielderror-response.patch +++ b/patch/tastypie-django22-fielderror-response.patch @@ -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): + """ +