Skip to content

Commit

Permalink
fix: raise error when result is nil in fix_old task
Browse files Browse the repository at this point in the history
  • Loading branch information
classicalliu committed Sep 27, 2018
1 parent 84f0425 commit 4e94730
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/event_logs.rake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace :event_logs do
task fix_old: :environment do
Transaction.find_each do |t|
receipt = CitaSync::Api.get_transaction_receipt(t.cita_hash)
logs = receipt["result"]["logs"]
logs = receipt.dig "result", "logs"
next if logs.blank?

CitaSync::Persist.save_event_logs(logs)
Expand Down

0 comments on commit 4e94730

Please sign in to comment.