From 5eabe15b9e9e72797c7950b4a9c6343b06e88925 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 1 Sep 2014 20:36:39 -0500 Subject: [PATCH] improvement to dal for GAE but still problem with key IN set --- gluon/dal.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gluon/dal.py b/gluon/dal.py index f09b1993..86586631 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -5181,14 +5181,15 @@ class GoogleDatastoreAdapter(NoSQLAdapter): if isinstance(second, set): second = list(second) if first.type == 'id': - second = [Key.from_path(first._tablename, int(i)) for i in second] + second = [self.keyfunc(first._tablename, int(i)) for i in second] return [GAEF(first.name, 'in', second, lambda a, b:a in b)] def CONTAINS(self, first, second, case_sensitive=False): # silently ignoring: GAE can only do case sensitive matches! if not first.type.startswith('list:'): raise SyntaxError("Not supported") - return [GAEF(first.name, '=', self.expand(second, first.type[5:]), lambda a, b:b in a)] + return [GAEF(first.name, '=', self.expand(second, first.type[5:]), + lambda a, b:b in a)] def NOT(self, first): nops = {self.EQ: self.NE,