From dfd677688ba4e8f642720ac3fe99a61e32a6e5db Mon Sep 17 00:00:00 2001
From: Dariusz Kedzierski <dkedzierski@syncad.com>
Date: Fri, 12 Jun 2020 19:03:05 +0200
Subject: [PATCH] Fix for empty cashout info list

---
 hive/indexer/posts.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hive/indexer/posts.py b/hive/indexer/posts.py
index 12cf2c483..8b12765c3 100644
--- a/hive/indexer/posts.py
+++ b/hive/indexer/posts.py
@@ -240,6 +240,7 @@ class Posts:
 
         comment_pending_payouts = hived.get_comment_pending_payouts([[op['author'], op['permlink']]])
         if comment_pending_payouts and 'cashout_info' in comment_pending_payouts[0]:
+            comment_pending_payouts = comment_pending_payouts[0]
             sql = """UPDATE
                         hive_posts
                     SET
@@ -403,6 +404,7 @@ class Posts:
 
         comment_pending_payouts = hived.get_comment_pending_payouts([[op['author'], op['permlink']]])
         if comment_pending_payouts and 'cashout_info' in comment_pending_payouts[0]:
+            comment_pending_payouts = comment_pending_payouts[0]
             sql = """UPDATE
                         hive_posts
                     SET
-- 
GitLab