diff options
-rw-r--r-- | archaeological_finds/forms.py | 2 | ||||
-rw-r--r-- | ishtar_common/templates/blocks/DataTables.html | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index af3c5356f..b77560ac9 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -721,7 +721,7 @@ class FindFormSelection(CustomFormSearch): label="", required=False, widget=widgets.DataTable( reverse_lazy('get-find'), - FindSelect, models.Find, + FindSelect, models.Find, source_full=reverse_lazy('get-find-full')), validators=[valid_id(models.Find)]) diff --git a/ishtar_common/templates/blocks/DataTables.html b/ishtar_common/templates/blocks/DataTables.html index 8af5f1a7b..b5f669963 100644 --- a/ishtar_common/templates/blocks/DataTables.html +++ b/ishtar_common/templates/blocks/DataTables.html @@ -241,8 +241,10 @@ jQuery(document).ready(function(){ {% if multiple_select %} var value = ""; for (k in data){ - if (k > 0) value += ","; - value += data[k]['id']; + if (typeof data[k]['id'] != "undefined") { + if (value) value += ","; + value += data[k]['id']; + } } {% else %} var value = data[0]['id']; |