Skip to content

Commit 46bee81

Browse files
committed
Fixed a test email object creation issue.
- Legacy-Id: 15180
1 parent 08c137c commit 46bee81

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ietf/nomcom/test_data.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ def nomcom_test_data():
123123
u.set_password(COMMUNITY_USER+"+password")
124124
u.save()
125125
plainman, _ = Person.objects.get_or_create(name="Plain Man", ascii="Plain Man", user=u)
126-
email, _ = Email.objects.get_or_create(address="plain@example.com", person=plainman, origin='test')
126+
email = Email.objects.filter(address="plain@example.com", person=plainman).first()
127+
if not email:
128+
email = Email.objects.create(address="plain@example.com", person=plainman, origin=u.username)
127129
nominee, _ = Nominee.objects.get_or_create(email=email, nomcom=nomcom)
128130

129131
# positions

0 commit comments

Comments
 (0)