Skip to content
Browse files

Removed duplicate function (MLH#8)

  • Loading branch information...
omn0mn0m authored and nlaz committed Mar 25, 2019
1 parent c026f0a commit 46b13390faf7dd8f54bb4266a2c6e94d23b064e9
Showing with 0 additions and 14 deletions.
  1. +0 −14 app/models/
@@ -28,19 +28,5 @@ def find_or_create_from_token(access_token):

return instance

def find_or_create_from_token(access_token):
data = GitHub.get_user_from_token(access_token)

"""Find existing user or create new User instance"""
instance = User.query.filter_by(username=data['login']).first()

if not instance:
instance = User(data['login'], data['avatar_url'], data['id'])

return instance

def __repr__(self):
return "<User: {}>".format(self.username)

0 comments on commit 46b1339

Please sign in to comment.
You can’t perform that action at this time.