explorerhq/sql-explorer

Running query without saving it, throwing error - Model instances passed to related filters must be saved.

raybittuiq opened this issue · 5 comments

I am trying to execute sql query but when I am trying to execute it without saving, it is throwing error, also while trying to see individual logs the same error is being thrown. The error is - ValueError("Model instances passed to related filters must be saved.")
What can be the reason here?.

When I am saving the query as a new query and then running it, it's working.

Are you using django 5?

Yes, I saw that the support for Django 5 is not there yet, so now I downgraded my Django to 4, and it's working fine now.

Ok great. That is indeed caused by a change in django 5.

Support for that is coming, I implemented it recently, but it's not in a release yet. We're getting ready for a new release that has a rebuilt frontend.

@marksweb any way we could help with that? is there a branch that already has that fix? otherwise, would have to revert to Django4.
Thanks so much!

@gabriels1234 Support for django 5 is in master, so you could install from the branch. However we've also got the new vite built frontend.

The current build (we send to test.pypi.org when PRs merge) has almost everything in place. But we need to run the vite build during the release, because the current build doesn't have any static files;
https://test.pypi.org/project/django-sql-explorer/3.2.1/#files