Skip to content

Commit

Permalink
fix: dynamic filters (#2104)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Bob authored Dec 13, 2023
1 parent 54b6e93 commit 8bb7326
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/avo/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,8 @@ def set_actions
def set_applied_filters
reset_filters if params[:reset_filter]

return @applied_filters = {} if (fetched_filters = fetch_filters).blank?
# Return if there are no filters or if the filters are actualy ActionController::Parameters (used by dynamic filters)
return @applied_filters = {} if (fetched_filters = fetch_filters).blank? || fetched_filters.is_a?(ActionController::Parameters)

@applied_filters = Avo::Filters::BaseFilter.decode_filters(fetched_filters)

Expand Down

0 comments on commit 8bb7326

Please sign in to comment.