summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/forms.py4
-rw-r--r--ishtar_common/templates/blocks/DataTables-content.html2
2 files changed, 3 insertions, 3 deletions
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py
index c0dbc6d7f..2a072aade 100644
--- a/ishtar_common/forms.py
+++ b/ishtar_common/forms.py
@@ -414,7 +414,7 @@ class FormSet(CustomForm, BaseFormSet):
kwargs["data"][prefix + '-INITIAL_FORMS']
super(FormSet, self).__init__(*args, **kwargs)
- def check_duplicate(self, key_names, error_msg=""):
+ def check_duplicate(self, key_names, error_msg="", check_null=False):
"""Check for duplicate items in the formset"""
if any(self.errors):
return
@@ -428,7 +428,7 @@ class FormSet(CustomForm, BaseFormSet):
item = [key_name in form.cleaned_data and
form.cleaned_data[key_name]
for key_name in key_names]
- if not [v for v in item if v]:
+ if not check_null and not [v for v in item if v]:
continue
if item in items:
raise forms.ValidationError(error_msg)
diff --git a/ishtar_common/templates/blocks/DataTables-content.html b/ishtar_common/templates/blocks/DataTables-content.html
index 41513aade..bd7ed592c 100644
--- a/ishtar_common/templates/blocks/DataTables-content.html
+++ b/ishtar_common/templates/blocks/DataTables-content.html
@@ -20,7 +20,7 @@
</button>
</div>
</div>
- <div class='col-md-2'>
+ <div>
<div class="btn-group btn-group-sm" role="group"
aria-label="{% trans 'Export'%}">
{% if source_full or extra_sources %}