From 582ee76919b9cc42153305c028808fde29b8a30f Mon Sep 17 00:00:00 2001 From: Felipe Vieira Date: Tue, 13 Dec 2011 15:00:16 +0000 Subject: [PATCH] ajustando script de migracao --- sigi/apps/servidores/management/commands/migra.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sigi/apps/servidores/management/commands/migra.py b/sigi/apps/servidores/management/commands/migra.py index 61a934f..ba505ad 100644 --- a/sigi/apps/servidores/management/commands/migra.py +++ b/sigi/apps/servidores/management/commands/migra.py @@ -54,7 +54,10 @@ class Command(BaseCommand): # procuro o usuario por email do interlegis if email: try: user = User.objects.get(email=email) - except User.DoesNotExist: pass + except User.DoesNotExist: + email = username + '@interlegis.leg.br' + try: user = User.objects.get(email=email) + except User.DoesNotExist: pass if not user and username: try: user = User.objects.get(username=username)