avo
avo copied to clipboard
Rest API Resource select all feature breaks
Describe the bug
We have implemented two rest API resources following this recipe: https://docs.avohq.io/2.0/recipes/rest-api-integration.html and after updating to Avo 2.14 it started throwing an exception (watch screenshot). The problem is, in our rest API based resources we don't have a DB query because our index rows are fetched from another application via API and they are not DB persistent models.
Screenshots

Impact
- [x] High impact
- [ ] Medium impact
- [ ] Low impact
Urgency
- [x] High urgency
- [ ] Medium urgency
- [ ] low urgency
We should probably check to see if it responds to to_sql. I can't test it locally. Can you share a PR when you've got some time? I think return if @query.all.respond_to?(:to_sql).nil? in app/components/avo/index/resource_table_component.rb should fix it.