delete event if speakers arent approved or created

This commit is contained in:
Stephan Telling 2017-07-15 17:17:19 +02:00
parent 05946d065b
commit 1a3e1088f7
No known key found for this signature in database
GPG key ID: D4892289F36ADA9B

View file

@ -282,6 +282,7 @@ class EventProposal(UserSubmittedModel):
try:
event.speakers.add(sp.speaker)
except ObjectDoesNotExist:
event.delete()
raise ValidationError('Not all speakers are approved or created yet.')
self.proposal_status = eventproposalmodel.PROPOSAL_APPROVED