From 09abc5511fbb574cf8d0947592a8bbac8c520ef5 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 30 Apr 2019 14:53:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=83=A8=E9=97=A8url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 53eb23ae..d4e08240 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1416,7 +1416,8 @@ end def update_depart_identifier if params[:depart] && params[:identifier] @department = Department.where(:id => params[:depart]).first - @department.update_attributes(:identifier => params[:identifier]) if @department.present? + identifier = params[:identifier].strip.blank? ? nil : params[:identifier].strip + @department.update_attributes(:identifier => identifier) if @department.present? end end