From 37970ce95c3900fd0347ab7034887fe229836f99 Mon Sep 17 00:00:00 2001 From: NanZhang Date: Tue, 1 Aug 2023 16:42:14 +0800 Subject: [PATCH] chore: remove udt account query fileds select (#1354) --- lib/tasks/migration/update_output_cells_status.rake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/tasks/migration/update_output_cells_status.rake b/lib/tasks/migration/update_output_cells_status.rake index eb9434568..fc48f7a48 100644 --- a/lib/tasks/migration/update_output_cells_status.rake +++ b/lib/tasks/migration/update_output_cells_status.rake @@ -39,8 +39,7 @@ class UpdateCellOutputsStatus address = Address.find(udt_output.address_id) udt_type = udt_type(udt_output.cell_type) - udt_account = address.udt_accounts.where(type_hash: udt_output.type_hash, udt_type: udt_type).select(:id, - :created_at).first + udt_account = address.udt_accounts.where(type_hash: udt_output.type_hash, udt_type: udt_type).first amount = udt_account_amount(udt_type, udt_output.type_hash, address) if udt_account.present? @@ -48,8 +47,7 @@ class UpdateCellOutputsStatus else puts "udt_account not: #{udt_output.id}" - udt = Udt.where(type_hash: udt_output.type_hash, udt_type: udt_type).select(:id, :udt_type, :full_name, - :symbol, :decimal, :published, :code_hash, :type_hash, :created_at).take! + udt = Udt.where(type_hash: udt_output.type_hash, udt_type: udt_type).take! nft_token_id = udt_type == "nrc_721_token" ? CkbUtils.parse_nrc_721_args(udt_output.type_script.args).token_id : nil new_udt_accounts_attribute = {