From 4a57271680a562f6b3ef5d720d888b816b713933 Mon Sep 17 00:00:00 2001
From: Dariusz Kedzierski <dkedzierski@syncad.com>
Date: Wed, 24 Jun 2020 19:53:11 +0200
Subject: [PATCH] Minor fix: fixed bad letter in table aliases for joins

---
 hive/server/bridge_api/cursor.py     | 2 +-
 hive/server/bridge_api/methods.py    | 2 +-
 hive/server/condenser_api/cursor.py  | 2 +-
 hive/server/condenser_api/methods.py | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hive/server/bridge_api/cursor.py b/hive/server/bridge_api/cursor.py
index 6a0fc86bb..b6c701f6d 100644
--- a/hive/server/bridge_api/cursor.py
+++ b/hive/server/bridge_api/cursor.py
@@ -185,7 +185,7 @@ async def pids_by_category(db, tag, sort, last_id, limit):
                     post_id 
                 FROM 
                     hive_post_tags hpt
-                INNER JOIN hive_tag_data htd ON hpt.tag_id=htp.id
+                INNER JOIN hive_tag_data htd ON hpt.tag_id=htd.id
                 WHERE htd.tag = :tag
             """
             where.append("id IN (%s)" % sql)
diff --git a/hive/server/bridge_api/methods.py b/hive/server/bridge_api/methods.py
index 8f10fd0fb..64dd84949 100644
--- a/hive/server/bridge_api/methods.py
+++ b/hive/server/bridge_api/methods.py
@@ -196,7 +196,7 @@ async def get_ranked_posts(context, sort, start_author='', start_permlink='',
                     post_id 
                 FROM 
                     hive_post_tags hpt
-                INNER JOIN hive_tag_data htd ON hpt.tag_id=htp.id
+                INNER JOIN hive_tag_data htd ON hpt.tag_id=htd.id
                 WHERE htd.tag = :tag
                 )
             """
diff --git a/hive/server/condenser_api/cursor.py b/hive/server/condenser_api/cursor.py
index 006a47d4e..c281c27bf 100644
--- a/hive/server/condenser_api/cursor.py
+++ b/hive/server/condenser_api/cursor.py
@@ -180,7 +180,7 @@ async def pids_by_query(db, sort, start_author, start_permlink, limit, tag):
                     post_id 
                 FROM 
                     hive_post_tags hpt
-                INNER JOIN hive_tag_data htd ON hpt.tag_id=htp.id
+                INNER JOIN hive_tag_data htd ON hpt.tag_id=htd.id
                 WHERE htd.tag = :tag
             """
             where.append("id IN (%s)" % sql)
diff --git a/hive/server/condenser_api/methods.py b/hive/server/condenser_api/methods.py
index a6a0ba05d..53c91d3a9 100644
--- a/hive/server/condenser_api/methods.py
+++ b/hive/server/condenser_api/methods.py
@@ -256,7 +256,7 @@ async def get_discussions_by(discussion_type, context, start_author: str = '',
                     post_id 
                 FROM 
                     hive_post_tags hpt
-                INNER JOIN hive_tag_data htd ON hpt.tag_id=htp.id
+                INNER JOIN hive_tag_data htd ON hpt.tag_id=htd.id
                 WHERE htd.tag = :tag
             ) """
 
-- 
GitLab