Field exceptions are silently passed when slicing geoqueryset
|Reported by:||Jani Tiainen||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When using GeoDjango exception happens when populating model from database using get().
x = MyModel.objects.get(pk=1)
Above works as expected, correct exception is thrown
qs = MyModel.objects.filter(pk=1) qs
Now IndexError exception is thrown instead of exception that was expected (in my particular case, there was invalid geometry).
Returned list from queryset itself is empty, no error thrown at all.