Fix query for current accounts
I had accidentally crafted the query so that we got something like an outer join when I actually wanted an inner join. Figuring out how to get this in SQLAlchemy took a bit of work, but I got it :)
This commit is contained in:
parent
b9dcf0e9a9
commit
23ca01f1b1
|
@ -30,6 +30,8 @@ def _select():
|
||||||
vanth.tables.OFXSource.c.uuid.label('source.uuid'),
|
vanth.tables.OFXSource.c.uuid.label('source.uuid'),
|
||||||
subselect,
|
subselect,
|
||||||
]).select_from(
|
]).select_from(
|
||||||
|
vanth.tables.OFXAccount.join(vanth.tables.OFXSource)
|
||||||
|
).select_from(
|
||||||
subselect
|
subselect
|
||||||
).where(
|
).where(
|
||||||
vanth.tables.OFXAccount.c.uuid == subselect.c.ofxaccount
|
vanth.tables.OFXAccount.c.uuid == subselect.c.ofxaccount
|
||||||
|
|
Loading…
Reference in New Issue