fix
This commit is contained in:
parent
f2909d2992
commit
5c8283ab5b
|
@ -54,7 +54,7 @@ class Database:
|
|||
return self.db.run_query(query)
|
||||
|
||||
def get_post(self, id):
|
||||
query = f'''SELECT cast(x_posts.id as TEXT), x_posts.*, x_accounts.x_handle, x_accounts.rating from x_posts
|
||||
query = f'''SELECT cast(x_posts.id as TEXT), x_posts.*, x_accounts.x_handle, cast(account_id as TEXT) as account_id, x_accounts.rating, saved_files from x_posts
|
||||
LEFT JOIN x_accounts
|
||||
ON x_posts.account_id = x_accounts.id WHERE x_posts.id = {id}
|
||||
LIMIT 1'''
|
||||
|
@ -95,7 +95,7 @@ class Database:
|
|||
where_query = self.build_where_query(artist, actions_taken, last_id, include_ratings, tags)
|
||||
|
||||
query = f'''
|
||||
SELECT x_posts.id, cast(x_posts.id as TEXT) as id_str, action_taken, saved_files != \'{{}}\' as is_saved, text, files, date, x_handle, x_accounts.rating FROM x_posts
|
||||
SELECT x_posts.id, cast(x_posts.id as TEXT) as id_str, action_taken, saved_files, text, files, date, x_handle, cast(account_id as TEXT) as account_id, x_accounts.rating FROM x_posts
|
||||
LEFT JOIN x_accounts
|
||||
ON x_posts.account_id = x_accounts.id
|
||||
{where_query}
|
||||
|
|
Loading…
Reference in New Issue