memory (persistent, sqlite): fixed getPrivates bug with keys arguments and its use in LazyPersistentBinaryDict

This commit is contained in:
Goffi 2017-03-29 19:27:52 +02:00
commit 06fd34fe5e
2 changed files with 6 additions and 3 deletions

View file

@ -571,8 +571,9 @@ class SqliteStorage(object):
args = [namespace]
if keys is not None:
query_parts.append(u'AND key IN ?')
args.append(keys)
placeholders = u','.join(len(keys) * u'?')
query_parts.append(u'AND key IN (' + placeholders + u')')
args.extend(keys)
if profile is not None:
query_parts.append(u'AND profile_id=?')