change bug in balanceQuery

This commit is contained in:
nigel007 2021-05-13 23:22:36 +08:00
parent 56e9a9175d
commit c0515b9e7f
1 changed files with 1 additions and 1 deletions

View File

@ -12,8 +12,8 @@ class Blockchain::BalanceQuery < ApplicationQuery
token_list = find_repo_with_token(params["user_id"])
result_list = []
token_list.each do |t|
owner = User.find_by(id: t['username'].to_i)
project = Project.find_by(id: t['token_name'].to_i)
owner = User.find_by(id: project.user_id)
if owner.nil? || project.nil?
else
balance = t['balance']