mirror of
https://github.com/NoiTheCat/WorldTime.git
synced 2024-11-21 14:34:36 +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,21 +61,21 @@ 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
|
||||||
return result[0]
|
return result[0]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_list(self, serverid, userid=None):
|
def get_list(self, serverid, userid=None):
|
||||||
'''
|
'''
|
||||||
Retrieves a list of recent time zones based on
|
Retrieves a list of recent time zones based on
|
||||||
|
|
Loading…
Reference in a new issue