Skip to content

Commit a5290e1

Browse files
committed
Made some changes to the missing-email submission handling. This may have fixed the creation of author records containing 'none' email entries, but as I've not been able to reproduce the issue, this is uncertain. Next is to build an email notification assert statement to help capture information if this happens.
- Legacy-Id: 12898
1 parent 27351c4 commit a5290e1

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

ietf/submit/utils.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import datetime
3+
from unidecode import unidecode
34

45
from django.conf import settings
56

@@ -19,7 +20,6 @@
1920
from ietf.community.utils import update_name_contains_indexes_with_new_doc
2021
from ietf.submit.mail import announce_to_lists, announce_new_version, announce_to_authors
2122
from ietf.submit.models import Submission, SubmissionEvent, Preapproval, DraftSubmissionStateName
22-
from ietf.utils import unaccent
2323
from ietf.utils.log import log
2424

2525

@@ -387,23 +387,25 @@ def get_person_from_name_email(name, email):
387387
return None
388388

389389
def ensure_person_email_info_exists(name, email):
390-
person = get_person_from_name_email(name, email)
390+
addr = email
391+
email = None
392+
person = get_person_from_name_email(name, addr)
391393

392394
# make sure we have a person
393395
if not person:
394396
person = Person()
395397
person.name = name
396-
person.ascii = unaccent.asciify(person.name)
398+
person.ascii = unidecode(person.name)
397399
person.save()
398400

399401
# make sure we have an email address
400-
if email:
402+
if addr:
401403
active = True
402-
addr = email.lower()
404+
addr = addr.lower()
403405
else:
404406
# we're in trouble, use a fake one
405407
active = False
406-
addr = u"unknown-email-%s" % person.plain_name().replace(" ", "-")
408+
addr = u"unknown-email-%s" % person.plain_ascii().replace(" ", "-")
407409

408410
try:
409411
email = person.email_set.get(address=addr)

0 commit comments

Comments
 (0)