Fix transaction cursor
This commit is contained in:
parent
bad19c9136
commit
a9cfb752f0
|
@ -61,7 +61,7 @@ class Invoice:
|
|||
|
||||
table = SIILines.__table__()
|
||||
|
||||
cursor = Transaction().cursor
|
||||
cursor = Transaction().connection.cursor()
|
||||
cursor.execute(*table.select(Max(table.id), table.invoice,
|
||||
group_by=table.invoice))
|
||||
|
||||
|
@ -89,7 +89,7 @@ class Invoice:
|
|||
result[name] = dict((i.id, None) for i in invoices)
|
||||
|
||||
table = SIILines.__table__()
|
||||
cursor = Transaction().cursor
|
||||
cursor = Transaction().connection.cursor()
|
||||
cursor.execute(*table.select(Max(table.id), table.invoice,
|
||||
where=table.invoice.in_([x.id for x in invoices]),
|
||||
group_by=table.invoice))
|
||||
|
|
Loading…
Reference in New Issue