B #5286: find_by_ref hotFix (#525)

(cherry picked from commit fa4df3290e)
This commit is contained in:
Sergio Semedi Barranco authored and Tino Vazquez committed 2017-10-13 12:57:32 +02:00
1 parent 248b750945
commit 512da1ee67
1 file changed
+4 -1
@@ -83,7 +83,10 @@ class VIHelper
one_managed = one_managed.nil? || one_managed
pool = one_pool(the_class, false) if pool.nil?
@ref_hash ||= {}
@ref_hash[attribute] ||= create_ref_hash(attribute, pool)
if @ref_hash[attribute].nil? || @ref_hash[attribute] == {}
@ref_hash[attribute] = create_ref_hash(attribute, pool)
end
e = @ref_hash[attribute][ref]