Skip to content

Commit 08a3ec7

Browse files
committed
Work around problems if a document has two authors connected who's the
same person (fix the data issue rather than throwing an exception) - Legacy-Id: 4013
1 parent 562773a commit 08a3ec7

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

ietf/submit/utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,10 @@ def update_authorsREDESIGN(draft, submission):
405405
for author in submission.tempidauthors_set.exclude(author_order=0).order_by('author_order'):
406406
email = ensure_person_email_info_exists(author)
407407

408-
try:
409-
a = DocumentAuthor.objects.get(document=draft, author=email)
410-
except DocumentAuthor.DoesNotExist:
408+
a = DocumentAuthor.objects.filter(document=draft, author=email)
409+
if a:
410+
a = a[0]
411+
else:
411412
a = DocumentAuthor(document=draft, author=email)
412413

413414
a.order = author.author_order

0 commit comments

Comments
 (0)