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:
parent
6d6112de33
commit
8fbf13b17c
|
@ -18,7 +18,9 @@ def get(user_id):
|
||||||
vanth.tables.OFXAccount.c.uuid,
|
vanth.tables.OFXAccount.c.uuid,
|
||||||
]).where(
|
]).where(
|
||||||
vanth.tables.OFXAccount.c.source == vanth.tables.OFXSource.c.uuid
|
vanth.tables.OFXAccount.c.source == vanth.tables.OFXSource.c.uuid
|
||||||
).where(
|
)
|
||||||
|
if user_id:
|
||||||
|
query = query.where(
|
||||||
vanth.tables.OFXAccount.c.owner == user_id
|
vanth.tables.OFXAccount.c.owner == user_id
|
||||||
)
|
)
|
||||||
results = engine.execute(query)
|
results = engine.execute(query)
|
||||||
|
|
Loading…
Reference in New Issue