Allow privileged code to get any and all accounts

This is useful for testing. It requires specifying None rather than
defaulting for safety
This commit is contained in:
Eli Ribble 2016-06-23 08:47:11 -06:00
parent 6d6112de33
commit 8fbf13b17c
1 changed files with 4 additions and 2 deletions

View File

@ -18,7 +18,9 @@ def get(user_id):
vanth.tables.OFXAccount.c.uuid,
]).where(
vanth.tables.OFXAccount.c.source == vanth.tables.OFXSource.c.uuid
).where(
)
if user_id:
query = query.where(
vanth.tables.OFXAccount.c.owner == user_id
)
results = engine.execute(query)