ambitioninc / django-query-builder

Build complex queries for Django
django-query-builder.readthedocs.org
MIT License
176 stars 33 forks source link

Fix issue with json_cursor if django cursor is wrapped. #117

Closed geophphrie closed 1 year ago

geophphrie commented 1 year ago

The thing that is returned by connection.cursor() is (normally) a Django object of type CursorWrapper that itself has the "real" cursor as a property called cursor. However, it could be a CursorDebugWrapper instead, or it could be an outer wrapper wrapping one of those. For example django-debug-toolbar wraps CursorDebugWrapper in a NormalCursorWrapper. The django-db-readonly package wraps the Django CursorWrapper in a ReadOnlyCursorWrapper. This is resolved in this update.