possibly fixed Issue 1630:memdb id error -- tries casting None to long., thanks Luca

This commit is contained in:
mdipierro
2013-08-15 09:21:58 -05:00
parent 61d81c01c4
commit 2cdcdaf932
3 changed files with 4 additions and 5 deletions
+2 -3
View File
@@ -502,9 +502,8 @@ class Query(object):
'Query: right side of filter must be a value or entity')
if isinstance(left, Field) and left.name == 'id':
if op == '=':
self.get_one = \
QueryException(tablename=left._tablename,
id=long(right))
self.get_one = QueryException(
tablename=left._tablename, id=long(right or 0))
return
else:
raise SyntaxError('only equality by id is supported')