chore: Update tastypie-django22-fielderror-response.patch

This commit is contained in:
Jennifer Richards 2023-05-12 17:25:20 -03:00
parent ebd28cd783
commit 09276150b5
No known key found for this signature in database
GPG key ID: 9B2BF5C5ADDA6A6E

View file

@ -1,15 +1,15 @@
--- tastypie/resources.py.orig 2020-08-24 13:14:25.463166100 +0200 --- tastypie/resources.py.orig 2020-08-24 13:14:25.463166100 +0200
+++ tastypie/resources.py 2020-08-24 13:15:55.133759224 +0200 +++ tastypie/resources.py 2020-08-24 13:15:55.133759224 +0200
@@ -15,7 +15,7 @@ @@ -12,7 +12,7 @@
ObjectDoesNotExist, MultipleObjectsReturned, ValidationError, FieldDoesNotExist ObjectDoesNotExist, MultipleObjectsReturned, ValidationError, FieldDoesNotExist
) )
from django.core.signals import got_request_exception from django.core.signals import got_request_exception
-from django.core.exceptions import ImproperlyConfigured -from django.core.exceptions import ImproperlyConfigured
+from django.core.exceptions import ImproperlyConfigured, FieldError +from django.core.exceptions import ImproperlyConfigured, FieldError
from django.db.models.fields.related import ForeignKey from django.db.models.fields.related import ForeignKey
try: from django.urls.conf import re_path
from django.contrib.gis.db.models.fields import GeometryField from tastypie.utils.timezone import make_naive_utc
@@ -2207,6 +2207,8 @@ @@ -2198,6 +2198,8 @@
return self.authorized_read_list(objects, bundle) return self.authorized_read_list(objects, bundle)
except ValueError: except ValueError:
raise BadRequest("Invalid resource lookup data provided (mismatched type).") raise BadRequest("Invalid resource lookup data provided (mismatched type).")
@ -20,7 +20,7 @@
""" """
--- tastypie/paginator.py.orig 2020-08-25 15:24:46.391588425 +0200 --- tastypie/paginator.py.orig 2020-08-25 15:24:46.391588425 +0200
+++ tastypie/paginator.py 2020-08-25 15:24:53.591797122 +0200 +++ tastypie/paginator.py 2020-08-25 15:24:53.591797122 +0200
@@ -128,6 +128,8 @@ @@ -124,6 +124,8 @@
except (AttributeError, TypeError): except (AttributeError, TypeError):
# If it's not a QuerySet (or it's ilk), fallback to ``len``. # If it's not a QuerySet (or it's ilk), fallback to ``len``.
return len(self.objects) return len(self.objects)