Field exceptions are silently passed when slicing geoqueryset
|Reported by:||jtiai||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.
Change History (10)
comment:1 Changed 5 years ago by mtredinnick
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Resolution set to invalid
- Status changed from new to closed
comment:2 Changed 5 years ago by jtiai
- Resolution invalid deleted
- Status changed from closed to reopened