|
|
@@ -721,8 +721,8 @@ class BulkEditView(GetReturnURLMixin, View):
|
|
|
|
|
|
# ManyToManyFields
|
|
|
elif isinstance(model_field, ManyToManyField):
|
|
|
- getattr(obj, name).set(form.cleaned_data[name])
|
|
|
-
|
|
|
+ if form.cleaned_data[name].count() > 0:
|
|
|
+ getattr(obj, name).set(form.cleaned_data[name])
|
|
|
# Normal fields
|
|
|
elif form.cleaned_data[name] not in (None, ''):
|
|
|
setattr(obj, name, form.cleaned_data[name])
|