From 4d5d39e8878c6c713ae37bc616bf01064e723b03 Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Thu, 29 Mar 2012 09:59:35 -0500 Subject: [PATCH] fixed problem with autocomplete, thanks gmini50 (issue 741) --- VERSION | 2 +- gluon/sqlhtml.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 38de7d12..81fea9de 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.7 (2012-03-29 09:57:01) dev +Version 1.99.7 (2012-03-29 09:59:32) dev diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 73a7e42e..99b9a1a1 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -536,10 +536,10 @@ class AutocompleteWidget(object): def __init__(self, request, field, id_field=None, db=None, orderby=None, limitby=(0,10), keyword='_autocomplete_%(fieldname)s', - min_length=2): + min_length=2, help_fields=None, help_string=None): - self.help_fields = kwargs.get('help_fields',[]) - self.help_string = kwargs.get('help_string',None) + self.help_fields = help_fields or [] + self.help_string = help_string if self.help_fields and not self.help_string: self.help_string = ' '.join('%%(%s)s' for f in self.help_fields)