From 825a01cec3b84cfa315620817f59ca1f251fab3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Fri, 15 Jan 2016 12:34:28 +0100 Subject: [PATCH] fix the build --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 66f987e1c49..05f850e30d9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -252,7 +252,7 @@ class ApplicationController < ActionController::Base username_lower = params[:username].downcase username_lower.gsub!(/\.json$/, '') find_opts = { username_lower: username_lower } - find_opts[:active] = true unless opts[:include_inactive] || current_user.staff? + find_opts[:active] = true unless opts[:include_inactive] || current_user.try(:staff?) User.find_by(find_opts) elsif params[:external_id] external_id = params[:external_id].gsub(/\.json$/, '')