server: Retrieve first avatar from result set.
This commit is contained in:
parent
43904297d6
commit
f23da7844e
@ -40,7 +40,7 @@ class CallbackHandler(RequestHandler):
|
|||||||
if user is None:
|
if user is None:
|
||||||
# New user, do we have their avatar on file?
|
# New user, do we have their avatar on file?
|
||||||
avatar = self.application._db.query(Avatar).filter(
|
avatar = self.application._db.query(Avatar).filter(
|
||||||
Avatar.url==user_data['image_url'])
|
Avatar.url==user_data['image_url']).first()
|
||||||
if avatar is None:
|
if avatar is None:
|
||||||
# We don't have the avatar yet
|
# We don't have the avatar yet
|
||||||
avatar_res = yield self._client.fetch(user_data['image_url'])
|
avatar_res = yield self._client.fetch(user_data['image_url'])
|
||||||
|
Reference in New Issue
Block a user