projects
/
pgeu-web.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12fba03
)
Don't allow welcome email to be enabled without setting contents
author
Magnus Hagander
<magnus@hagander.net>
Thu, 29 Mar 2018 12:00:32 +0000
(14:00 +0200)
committer
Magnus Hagander
<magnus@hagander.net>
Thu, 29 Mar 2018 12:00:32 +0000
(14:00 +0200)
postgresqleu/confreg/models.py
patch
|
blob
|
blame
|
history
diff --git
a/postgresqleu/confreg/models.py
b/postgresqleu/confreg/models.py
index 1a853715a8b72f97dd2083a754afebac6f0e071b..3c49fd19209883939d11a0ce0773618bca32c633 100644
(file)
--- a/
postgresqleu/confreg/models.py
+++ b/
postgresqleu/confreg/models.py
@@
-183,6
+183,11
@@
class Conference(models.Model):
return False
+ def clean(self):
+ cc = super(Conference, self).clean()
+ if self.sendwelcomemail and not self.welcomemail:
+ raise ValidationError("Must specify an actual welcome mail if it's enabled!")
+
class RegistrationClass(models.Model):
conference = models.ForeignKey(Conference, null=False)
regclass = models.CharField(max_length=64, null=False, blank=False)