Fixed a test email object creation issue.
- Legacy-Id: 15180
This commit is contained in:
parent
08c137c960
commit
46bee81bdc
|
@ -123,7 +123,9 @@ def nomcom_test_data():
|
|||
u.set_password(COMMUNITY_USER+"+password")
|
||||
u.save()
|
||||
plainman, _ = Person.objects.get_or_create(name="Plain Man", ascii="Plain Man", user=u)
|
||||
email, _ = Email.objects.get_or_create(address="plain@example.com", person=plainman, origin='test')
|
||||
email = Email.objects.filter(address="plain@example.com", person=plainman).first()
|
||||
if not email:
|
||||
email = Email.objects.create(address="plain@example.com", person=plainman, origin=u.username)
|
||||
nominee, _ = Nominee.objects.get_or_create(email=email, nomcom=nomcom)
|
||||
|
||||
# positions
|
||||
|
|
Loading…
Reference in a new issue