fixed issue VirtualFields in select options
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.4.1-alpha.2+timestamp.2013.02.21.10.15.58
|
Version 2.4.1-alpha.2+timestamp.2013.02.21.10.20.58
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import decimal
|
|||||||
import unicodedata
|
import unicodedata
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
from utils import simple_hash, web2py_uuid, DIGEST_ALG_BY_SIZE
|
from utils import simple_hash, web2py_uuid, DIGEST_ALG_BY_SIZE
|
||||||
|
from dal import FieldVirtual, FieldMethod
|
||||||
|
|
||||||
JSONErrors = (NameError, TypeError, ValueError, AttributeError,
|
JSONErrors = (NameError, TypeError, ValueError, AttributeError,
|
||||||
KeyError)
|
KeyError)
|
||||||
@@ -508,6 +509,8 @@ class IS_IN_DB(Validator):
|
|||||||
fields = [f for f in table]
|
fields = [f for f in table]
|
||||||
else:
|
else:
|
||||||
fields = [table[k] for k in self.fields]
|
fields = [table[k] for k in self.fields]
|
||||||
|
ignore = (FieldVirtual,FieldMethod)
|
||||||
|
fields = filter(lambda f:not isinstance(f,ignore), fields)
|
||||||
if self.dbset.db._dbname != 'gae':
|
if self.dbset.db._dbname != 'gae':
|
||||||
orderby = self.orderby or reduce(lambda a, b: a | b, fields)
|
orderby = self.orderby or reduce(lambda a, b: a | b, fields)
|
||||||
groupby = self.groupby
|
groupby = self.groupby
|
||||||
|
|||||||
Reference in New Issue
Block a user