Check if view_args is not None to prevent KeyError
This commit is contained in:
parent
4c3de07684
commit
a76f61eb2a
@ -19,6 +19,9 @@ from atst.models import (
|
|||||||
def get_resources_from_context(view_args):
|
def get_resources_from_context(view_args):
|
||||||
query = None
|
query = None
|
||||||
|
|
||||||
|
if view_args is None:
|
||||||
|
view_args = {}
|
||||||
|
|
||||||
if "portfolio_token" in view_args:
|
if "portfolio_token" in view_args:
|
||||||
query = (
|
query = (
|
||||||
db.session.query(Portfolio)
|
db.session.query(Portfolio)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user