Added email origin information to some function calls that needed it.

- Legacy-Id: 15130
This commit is contained in:
Henrik Levkowetz 2018-05-05 12:49:10 +00:00
parent a66639299d
commit f0c0753e28
2 changed files with 4 additions and 2 deletions

View file

@ -86,7 +86,9 @@ def add_proceed(request):
# save email
Email.objects.create(address=email,
person=person)
person=person,
origin=request.user.username,
)
# in theory a user record could exist which wasn't associated with a Person
try:

View file

@ -324,7 +324,7 @@ class SubmitTests(TestCase):
prev_author = draft.documentauthor_set.all()[0]
if change_authors:
# Make it such that one of the previous authors has an invalid email address
bogus_person, bogus_email = ensure_person_email_info_exists(u'Bogus Person',None)
bogus_person, bogus_email = ensure_person_email_info_exists(u'Bogus Person', None, draft.name)
DocumentAuthor.objects.create(document=draft, person=bogus_person, email=bogus_email, order=draft.documentauthor_set.latest('order').order+1)
# pretend IANA reviewed it