forked from CGM_Public/pretix_original
Do not allow to bulk-set empty names for subevents (Z#23194943) (#5184)
This commit is contained in:
@@ -178,6 +178,13 @@ class SubEventBulkEditForm(I18nModelForm):
|
|||||||
widgets = {
|
widgets = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def clean(self):
|
||||||
|
data = super().clean()
|
||||||
|
if self.prefix + "name" in self.data.getlist('_bulk'):
|
||||||
|
if not data.get("name"):
|
||||||
|
self.add_error("name", _("This field is required."))
|
||||||
|
return data
|
||||||
|
|
||||||
def save(self, commit=True):
|
def save(self, commit=True):
|
||||||
objs = list(self.queryset)
|
objs = list(self.queryset)
|
||||||
fields = set()
|
fields = set()
|
||||||
|
|||||||
Reference in New Issue
Block a user