mirror of
https://github.com/beetbox/beets.git
synced 2025-12-26 18:43:38 +01:00
fixed store() (can't use sqlite ?-binding for column names in update), although it's never called yet
--HG-- extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%4029
This commit is contained in:
parent
6b113c8f6e
commit
d6472584be
1 changed files with 4 additions and 2 deletions
|
|
@ -138,11 +138,13 @@ class Item(object):
|
|||
store_id = self.id
|
||||
|
||||
# build assignments for query
|
||||
assignments = ','.join( ['?=?'] * (len(item_fields)-1) )
|
||||
assignments = ''
|
||||
subvars = []
|
||||
for key in item_keys:
|
||||
if key != 'id':
|
||||
subvars += [key, self.record[key]]
|
||||
assignments += key + '=?,'
|
||||
subvars.append(self.record[key])
|
||||
assignments = assignments[:-1] # knock off last ,
|
||||
|
||||
# finish the query
|
||||
query = 'update items set ' + assignments + ' where id=?'
|
||||
|
|
|
|||
Loading…
Reference in a new issue