Skip to content

Commit 5931b5d

Browse files
committed
Added another tastypie patch
- Legacy-Id: 18411
1 parent 7a422e8 commit 5931b5d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

patch/tastypie-django22-fielderror-response.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,15 @@
1818

1919
def obj_get(self, bundle, **kwargs):
2020
"""
21+
--- tastypie/paginator.py.orig 2020-08-25 15:24:46.391588425 +0200
22+
+++ tastypie/paginator.py 2020-08-25 15:24:53.591797122 +0200
23+
@@ -128,6 +128,8 @@
24+
except (AttributeError, TypeError):
25+
# If it's not a QuerySet (or it's ilk), fallback to ``len``.
26+
return len(self.objects)
27+
+ except ValueError as e:
28+
+ raise BadRequest("Invalid resource lookup: %s." % e)
29+
30+
def get_previous(self, limit, offset):
31+
"""
32+

0 commit comments

Comments
 (0)