From d3f9cfa4f59710dede0844f3f49ce0a1cc2cf1c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Wed, 11 Mar 2015 14:56:59 +0100 Subject: [PATCH] Fix #2401: Github integration error --- taiga/hooks/github/services.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/taiga/hooks/github/services.py b/taiga/hooks/github/services.py index e7924734..bc16c380 100644 --- a/taiga/hooks/github/services.py +++ b/taiga/hooks/github/services.py @@ -19,6 +19,7 @@ import uuid from django.core.urlresolvers import reverse from taiga.users.models import User +from taiga.users.models import AuthData from taiga.base.utils.urls import get_absolute_url @@ -36,13 +37,13 @@ def get_or_generate_config(project): return g_config -def get_github_user(user_id): +def get_github_user(github_id): user = None - if user_id: + if github_id: try: - user = User.objects.get(github_id=user_id) - except User.DoesNotExist: + user = AuthData.objects.get(key="github", value=github_id).user + except AuthData.DoesNotExist: pass if user is None: