Skip to content

Commit

Permalink
Fixed issue #456 (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
ToxicPie authored Jul 18, 2021
1 parent 7093a56 commit 2c0e2e8
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 2c0e2e8

Please sign in to comment.