diff --git a/app/controllers/distributions_controller.rb b/app/controllers/distributions_controller.rb index a394087146..68a0bb39e8 100644 --- a/app/controllers/distributions_controller.rb +++ b/app/controllers/distributions_controller.rb @@ -45,7 +45,7 @@ def index .distributions .includes(:partner, :storage_location, line_items: [:item]) .order('issued_at DESC') - .apply_filters(filter_params, helpers.selected_range) + .apply_filters(filter_params.except(:date_range), helpers.selected_range) @paginated_distributions = @distributions.page(params[:page]) @items = current_organization.items.alphabetized @item_categories = current_organization.item_categories @@ -310,7 +310,7 @@ def daily_items(pick_ups) def filter_params return {} unless params.key?(:filters) - params.require(:filters).permit(:by_item_id, :by_item_category_id, :by_partner, :by_state, :by_location) + params.require(:filters).permit(:by_item_id, :by_item_category_id, :by_partner, :by_state, :by_location, :date_range) end def perform_inventory_check