Skip to content

Commit 5c9fd68

Browse files
committed
Added exception handling in tastypie for a case which can occur if one tries to filter by reges on a FK.
- Legacy-Id: 9145
1 parent 86997e1 commit 5c9fd68

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tastypie/resources.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,6 +2068,8 @@ def obj_get_list(self, bundle, **kwargs):
20682068
return self.authorized_read_list(objects, bundle)
20692069
except ValueError:
20702070
raise BadRequest("Invalid resource lookup data provided (mismatched type).")
2071+
except TypeError as e:
2072+
raise BadRequest("Invalid resource lookup data provided (%s)." % e)
20712073

20722074
def obj_get(self, bundle, **kwargs):
20732075
"""

0 commit comments

Comments
 (0)