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:
Eli Ribble 2016-07-20 16:48:51 -06:00
parent b9dcf0e9a9
commit 23ca01f1b1
1 changed files with 2 additions and 0 deletions

View File

@ -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