Added bulk tag addition/removal

This commit is contained in:
Jeremy Stretch
2018-07-10 10:00:21 -04:00
parent e27765d965
commit 208409110f
8 changed files with 38 additions and 20 deletions

View File

@@ -543,6 +543,12 @@ class BulkEditView(GetReturnURLMixin, View):
cfv.value = form.cleaned_data[name]
cfv.save()
# Add/remove tags
if form.cleaned_data.get('add_tags', None):
obj.tags.add(*form.cleaned_data['add_tags'])
if form.cleaned_data.get('remove_tags', None):
obj.tags.remove(*form.cleaned_data['remove_tags'])
updated_count += 1
if updated_count: