Return True if cursor has any data.
(self)
| 212 | raise NotImplementedError |
| 213 | |
| 214 | def _has_data(self): |
| 215 | """Return True if cursor has any data.""" |
| 216 | queryset = self.order_by() |
| 217 | return False if queryset.first() is None else True |
| 218 | |
| 219 | def __bool__(self): |
| 220 | """Avoid to open all records in an if stmt in Py3.""" |