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