fix for empty fields
This commit is contained in:
parent
67f3447113
commit
7fbfed8bf4
|
@ -55,7 +55,7 @@ class Experience
|
||||||
|
|
||||||
fields_to_show.each do |t|
|
fields_to_show.each do |t|
|
||||||
if (self.fields[t].type.to_s == "String" || self.fields[t].type.to_s == "Object" rescue false)
|
if (self.fields[t].type.to_s == "String" || self.fields[t].type.to_s == "Object" rescue false)
|
||||||
fields_to_remove << t if (datas.where(t.to_sym.ne => nil, t.to_sym.ne => "").count == 0 rescue false)
|
fields_to_remove << t if (datas.where(t.to_sym.ne => nil).or(t.to_sym.ne => "").count == 0 rescue false)
|
||||||
elsif t == "duration"
|
elsif t == "duration"
|
||||||
fields_to_remove << t if (datas.where(:start_date.ne => nil).count == 0 rescue false)
|
fields_to_remove << t if (datas.where(:start_date.ne => nil).count == 0 rescue false)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue