mirror of
https://github.com/NoiTheCat/WorldTime.git
synced 2024-11-25 01:44:12 +00:00
Fix incorrect user being fetched
This commit is contained in:
parent
d355cd9d8f
commit
82f956f47a
1 changed files with 4 additions and 4 deletions
|
@ -61,15 +61,15 @@ class UserDatabase:
|
||||||
self.db.commit()
|
self.db.commit()
|
||||||
c.close()
|
c.close()
|
||||||
|
|
||||||
def get_user(self, serverid, usreid):
|
def get_user(self, serverid, userid):
|
||||||
'''
|
'''
|
||||||
Retrieves the time zone name of a single user
|
Retrieves the time zone name of a single user
|
||||||
'''
|
'''
|
||||||
c = self.db.cursor()
|
c = self.db.cursor()
|
||||||
c.execute("""
|
c.execute("""
|
||||||
SELECT zone FROM userdata
|
SELECT zone FROM userdata
|
||||||
WHERE guild_id = %s
|
WHERE guild_id = %s and user_id = %s
|
||||||
""", (serverid,))
|
""", (serverid, userid))
|
||||||
result = c.fetchone()
|
result = c.fetchone()
|
||||||
c.close()
|
c.close()
|
||||||
if result is None: return None
|
if result is None: return None
|
||||||
|
|
Loading…
Reference in a new issue