mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-01-31 05:10:45 -06:00
If get_user is called with a full user object as an argument, logs it and changes the object to be only the user_id
This commit is contained in:
parent
0612c653b8
commit
002e1ccb55
@ -398,6 +398,9 @@ class Session(base.baseSession):
|
||||
""" Returns an user object associated with an ID.
|
||||
id str: User identifier, provided by Twitter.
|
||||
returns a tweepy user object."""
|
||||
if hasattr(id, "id_str"):
|
||||
log.error("Called get_user function by passing a full user id as a parameter.")
|
||||
id = id.id_str
|
||||
if ("users" in self.db) == False or (str(id) in self.db["users"]) == False:
|
||||
log.debug("Requesting user id {} as it is not present in the users database.".format(id))
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user