From 294c60f8ada3b5cf20da39c14a670af5f219114f Mon Sep 17 00:00:00 2001 From: Arnaud Levy <contact@arnaudlevy.com> Date: Sat, 7 May 2022 08:44:22 +0200 Subject: [PATCH] Fix #369 --- .../admin/communication/unsplash_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/admin/communication/unsplash_controller.rb b/app/controllers/admin/communication/unsplash_controller.rb index b48411c31..f3ecdc147 100644 --- a/app/controllers/admin/communication/unsplash_controller.rb +++ b/app/controllers/admin/communication/unsplash_controller.rb @@ -9,10 +9,10 @@ class Admin::Communication::UnsplashController < Admin::Communication::Applicati else p = { query: params[:query], - page: (params[:page] || 1), - per_page: (params[:per_page] || 10), - orientation: (params[:orientation] || 'squarish'), - lang: (params[:lang] || 'en') + page: (params[:page].presence || 1), + per_page: (params[:per_page].presence || 10), + orientation: (params[:orientation].presence || 'squarish'), + lang: (params[:lang].presence || 'en') } @search = Unsplash::Search.search "/search/photos", Unsplash::Photo, p @total = @search.total -- GitLab