Skip to content

Commit

Permalink
Fixed issue cheran-senthil#456
Browse files Browse the repository at this point in the history
  • Loading branch information
ToxicPie committed May 3, 2021
1 parent a64faa1 commit 20d3d73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tle/util/db/user_db_conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,11 +475,11 @@ def add_starboard_message(self, original_msg_id, starboard_msg_id, guild_id):
self.conn.commit()

def check_exists_starboard_message(self, original_msg_id):
query = ('SELECT 1 '
query = ('SELECT COUNT(*) AS cnt '
'FROM starboard_message '
'WHERE original_msg_id = ?')
res = self.conn.execute(query, (original_msg_id,)).fetchone()
return res is not None
return res.cnt != 0

def remove_starboard_message(self, *, original_msg_id=None, starboard_msg_id=None):
assert (original_msg_id is None) ^ (starboard_msg_id is None)
Expand Down

0 comments on commit 20d3d73

Please sign in to comment.