Allow EDE compens. form for experts without corp.

This commit is contained in:
Claude Paroz 2018-05-09 15:42:11 +02:00
parent 390f563ac0
commit e98cb2a4e2
2 changed files with 6 additions and 1 deletions

View file

@ -313,7 +313,7 @@ class CompensationForm:
[self.formating('Adresse complète :'), person.street or self.points],
['', person.pcode_city if person.pcode else self.points],
['', self.points],
[self.formating('Employeur :'), person.corporation.name or self.points],
[self.formating('Employeur :'), person.corporation.name if person.corporation else self.points],
[Spacer(0, 0.2 * cm)],
]

View file

@ -248,6 +248,11 @@ tél. 032 886 33 00
)
self.assertEqual(response['Content-Type'], 'application/pdf')
self.assertGreater(len(response.content), 200)
# Expert without corporation
st.expert = CorpContact.objects.create(first_name='James', last_name='Bond')
st.save()
response = self.client.post(url, follow=True)
self.assertEqual(response.status_code, 200)
# Mentor form
st.mentor = CorpContact.objects.get(last_name="Horner")