add project.nil? in

This commit is contained in:
nigel007 2021-05-14 11:17:03 +08:00
parent c0515b9e7f
commit f8fa3c2b31
1 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,9 @@ class Blockchain::BalanceQuery < ApplicationQuery
result_list = [] result_list = []
token_list.each do |t| token_list.each do |t|
project = Project.find_by(id: t['token_name'].to_i) project = Project.find_by(id: t['token_name'].to_i)
if project.nil?
next
end
owner = User.find_by(id: project.user_id) owner = User.find_by(id: project.user_id)
if owner.nil? || project.nil? if owner.nil? || project.nil?
else else