small fix for empty city

This commit is contained in:
Harry Bomrah 2017-07-05 15:55:53 +08:00
parent acf3333775
commit c4cd364bc6
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@
<div class="controls">
<%
opts = []
if !@counselor.new_record?
if !@counselor.new_record? && @counselor.hps_city_id.nil? && @counselor.hps_city_id.empty?
opts = HpsCity.find(@counselor.hps_city_id).hps_counties.asc(:old_id).collect{|sc| [sc.name, sc.id]}
end
%>