forked from 0x2620/pandora
only commit if we have data
This commit is contained in:
parent
9f4cdb1f63
commit
aed67b9e42
1 changed files with 5 additions and 5 deletions
|
@ -42,7 +42,7 @@ def get_sequences(itemId):
|
||||||
v = ', '.join([isinstance(v, basestring) and "'%s'"%v or str(v)
|
v = ', '.join([isinstance(v, basestring) and "'%s'"%v or str(v)
|
||||||
for v in sequence.values()])
|
for v in sequence.values()])
|
||||||
values.append('(%s)'%v)
|
values.append('(%s)'%v)
|
||||||
|
if values:
|
||||||
cursor = connection.cursor()
|
cursor = connection.cursor()
|
||||||
sql = "INSERT INTO sequence_sequence (%s) VALUES %s" % (keys, ', '.join(values));
|
sql = "INSERT INTO sequence_sequence (%s) VALUES %s" % (keys, ', '.join(values));
|
||||||
cursor.execute(sql)
|
cursor.execute(sql)
|
||||||
|
|
Loading…
Reference in a new issue