forked from beba/foerderbarometer
remove other option before saving
This commit is contained in:
parent
2c79732200
commit
1dbd38dc4a
|
|
@ -203,6 +203,14 @@ class ProjectCategoryField(models.ManyToManyField):
|
|||
|
||||
return super().formfield(**kwargs)
|
||||
|
||||
def save_form_data(self, instance, data):
|
||||
data = list(data)
|
||||
|
||||
with suppress(ValueError):
|
||||
data.remove(self.remote_field.model.other)
|
||||
|
||||
return super().save_form_data(instance, data)
|
||||
|
||||
|
||||
class Project(Volunteer):
|
||||
end_mail_send = models.BooleanField(default=False, verbose_name='Keine Projektabschlussmail schicken')
|
||||
|
|
|
|||
Loading…
Reference in New Issue