Skip to content

Commit

Permalink
add condition
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerKSI committed Apr 17, 2023
1 parent 1e86bf7 commit dfd54e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flusher/flusher/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def handle_new_block(self, msg):
self.conn.execute(blocks.insert(), msg)

def handle_new_transaction(self, msg):
msg["fee_payer"] = msg["fee_payer"] if len(msg["fee_payer"]) else None
msg["fee_payer"] = msg["fee_payer"] if "fee_payer" in msg and len(msg["fee_payer"]) else None
self.conn.execute(
insert(transactions).values(**msg).on_conflict_do_update(constraint="transactions_pkey", set_=msg)
)
Expand Down

0 comments on commit dfd54e7

Please sign in to comment.