ForestAdmin / django-forestadmin

🐍 Django agent for Forest Admin to integrate directly to your existing Django backend application.
https://www.forestadmin.com
GNU General Public License v3.0
122 stars 18 forks source link

Smart fields not being filtered out in list view #115

Closed lucasob closed 2 years ago

lucasob commented 2 years ago

Expected behavior

One would expect hidden smart views to not be invoked at all when querying a list of model instances.

Actual behavior

The smart fields are hidden from the response, however, they are all still calculated, but then filtered out of the response.

This is made clear in ListView::get where ListView::hand_smart_fields is called.

Inside this function, all smart fields for the model are appended to the response, only to then be filtered out again by ListView::serialize

Context

Support ticket raised: https://community.forestadmin.com/t/dont-load-smart-field-in-collection-view/5102