These are chat archives for eleweek/histsync

26th
Jun 2015
Ryan Siemens
@rsiemens
Jun 26 2015 04:22
So ran into an interesting issue. If you revoke the apps permissions with github then re authorize it it will create another record of <User> with same name/email fields
This message was deleted
def _get_user_checking_credentials(username, api_key):
        user = User.query.filter_by(name=username).first()
Ryan Siemens
@rsiemens
Jun 26 2015 04:27
simple fix was to query by username and apikey
probably also have to find a way to handle the "dead" record now sitting in there.
Alexander Putilin
@eleweek
Jun 26 2015 19:36
hmm
thanks for the catch
I think the simplest fix here would be to remove the last parameter in get_or_create her
user = get_or_create(User, name=user_json["login"], email=user_json.get("email"), github_access_token=access_token)
(i.e. github_access_token)