Do not search on empty string. Fixes #467

pull/2477/head
Daniel Reis 2016-07-06 23:54:01 +01:00 committed by filoquin
parent 8051c95c4f
commit be6f96e68b
1 changed files with 3 additions and 1 deletions

View File

@ -49,7 +49,9 @@ class ModelExtended(models.Model):
self, name=name, args=args, operator=operator, limit=limit) self, name=name, args=args, operator=operator, limit=limit)
enabled = self.env.context.get('name_search_extended', True) enabled = self.env.context.get('name_search_extended', True)
# Perform extended name search # Perform extended name search
if enabled and operator in ALLOWED_OPS: # Note: Empty name causes error on
# Customer->More->Portal Access Management
if name and enabled and operator in ALLOWED_OPS:
# Support a list of fields to search on # Support a list of fields to search on
all_names = _get_rec_names(self) all_names = _get_rec_names(self)
base_domain = args or [] base_domain = args or []