You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code in whitelist/blacklist logs and indexs that compiles a hash of the different names is ambiguous. It depends on the database returning ordered values instead of enforcing ordered returns.
#Build the source_share_user names
@source_share_user_names = {}
values = Whitelist.where("share_id =?", csu.share_id).pluck("source_share_user").uniq
names = ShareUser.where(id: values).pluck("main_char_name")
values.each do |val|
@source_share_user_names.store(names[values.index(val)].to_sym, val)
end
@source_share_user_names = {}
values = BlackListEntityLog.where("share_id =?", csu.share_id).pluck("source_share_user_id").uniq
names = ShareUser.where(id: values).pluck("main_char_name")
values.each do |val|
@source_share_user_names.store(names[values.index(val)].to_sym, val)
end
Solution
Build specs to test this behavior
Enforce ordered returns
The text was updated successfully, but these errors were encountered:
The code in whitelist/blacklist logs and indexs that compiles a hash of the different names is ambiguous. It depends on the database returning ordered values instead of enforcing ordered returns.
Solution
The text was updated successfully, but these errors were encountered: