From 23ca01f1b1bde9f10ca8334cd06a2fdb0b6cacc8 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Wed, 20 Jul 2016 16:48:51 -0600 Subject: [PATCH] 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 :) --- vanth/platform/ofxaccount.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vanth/platform/ofxaccount.py b/vanth/platform/ofxaccount.py index a625223..d6937ed 100644 --- a/vanth/platform/ofxaccount.py +++ b/vanth/platform/ofxaccount.py @@ -30,6 +30,8 @@ def _select(): vanth.tables.OFXSource.c.uuid.label('source.uuid'), subselect, ]).select_from( + vanth.tables.OFXAccount.join(vanth.tables.OFXSource) + ).select_from( subselect ).where( vanth.tables.OFXAccount.c.uuid == subselect.c.ofxaccount