From dfd54e7212565756f9ed40c30ca3e2a47acafd26 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Mon, 17 Apr 2023 19:52:09 +0700 Subject: [PATCH] add condition --- flusher/flusher/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flusher/flusher/handler.py b/flusher/flusher/handler.py index d41ca19ab..cf247aece 100644 --- a/flusher/flusher/handler.py +++ b/flusher/flusher/handler.py @@ -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) )