Don't try to set the active status of emails, if we are to do that, it

has to be in a more clever way
 - Legacy-Id: 3746
This commit is contained in:
Ole Laursen 2011-12-07 18:38:22 +00:00
parent cd3e4fe054
commit 896347bf7c

View file

@ -114,12 +114,11 @@ def possibly_import_other_priority_email(email, addr):
if addr and addr.lower() != email.address.lower():
try:
e = Email.objects.get(address=addr)
if e.person != email.person or e.active != False:
if e.person != email.person:
e.person = email.person
e.active = False
e.save()
except Email.DoesNotExist:
Email.objects.create(address=addr, person=email.person, active=False)
Email.objects.create(address=addr, person=email.person)
def dont_save_queries():
# prevent memory from leaking when settings.DEBUG=True