diff --git a/spp_import_match/models/import_match.py b/spp_import_match/models/import_match.py index 58ed80eb6..39c924579 100644 --- a/spp_import_match/models/import_match.py +++ b/spp_import_match/models/import_match.py @@ -66,10 +66,11 @@ def _match_find(self, model, converted_row, imported_row): domain.append((field_value, "=", row_value)) if not combination_valid: continue - _logger.info("DOMAIN: %s" % domain) match = model.search(domain) if len(match) == 1: return match + elif len(match) > 1: + raise ValidationError(_("Multiple matches found for '%s'!" % match[0].name)) return model diff --git a/spp_import_match/views/import_match_view.xml b/spp_import_match/views/import_match_view.xml index cbb4e6bc1..a6a90ec43 100644 --- a/spp_import_match/views/import_match_view.xml +++ b/spp_import_match/views/import_match_view.xml @@ -39,15 +39,15 @@ - + - - + +