X-Git-Url: https://git.tokkee.org/?p=roundup.git;a=blobdiff_plain;f=roundup%2Fbackends%2Frdbms_common.py;h=6942a78b847af1b0a37b5d581b1fc2367bb04e9d;hp=a95493a3536a18faf4ac7e78d71bbf7cb88f234e;hb=111bcd404dba914ebbb25ac20cd8ec038e1c25a1;hpb=f3ce147eddfb54575032e64112278417d32f4fd5 diff --git a/roundup/backends/rdbms_common.py b/roundup/backends/rdbms_common.py index a95493a..6942a78 100644 --- a/roundup/backends/rdbms_common.py +++ b/roundup/backends/rdbms_common.py @@ -2330,6 +2330,24 @@ class Class(hyperdb.Class): pass if p.sort_type > 0: oc = ac = '_%s.__%s_int__'%(pln,k) + elif isinstance(propclass, Boolean) and p.sort_type < 2: + if type(v) == type(""): + v = v.split(',') + if type(v) != type([]): + v = [v] + bv = [] + for val in v: + if type(val) is type(''): + bv.append(propclass.from_raw (val)) + else: + bv.append(bool(val)) + if len(bv) == 1: + where.append('_%s._%s=%s'%(pln, k, a)) + args = args + bv + else: + s = ','.join([a for x in v]) + where.append('_%s._%s in (%s)'%(pln, k, s)) + args = args + bv elif p.sort_type < 2: if isinstance(v, type([])): s = ','.join([a for x in v])