fixed 1757:Broken support for 'belongs' with GAE datastore, thanks Alan

This commit is contained in:
mdipierro
2013-11-06 11:14:56 -06:00
parent 5cee4f8876
commit 65b883749a
2 changed files with 2 additions and 2 deletions

View File

@@ -1 +1 @@
Version 2.7.4-stable+timestamp.2013.11.06.11.12.23
Version 2.7.4-stable+timestamp.2013.11.06.11.14.11

View File

@@ -4858,7 +4858,7 @@ class GoogleDatastoreAdapter(NoSQLAdapter):
return '%s, %s' % (self.expand(first),self.expand(second))
def BELONGS(self,first,second=None):
if not isinstance(second,(list, tuple)):
if not isinstance(second,(list, tuple, set)):
raise SyntaxError("Not supported")
if first.type != 'id':
return [GAEF(first.name,'in',self.represent(second,first.type),lambda a,b:a in b)]