Check if view_args is not None to prevent KeyError

This commit is contained in:
leigh-mil 2020-02-04 16:42:27 -05:00
parent 4c3de07684
commit a76f61eb2a

View File

@ -19,6 +19,9 @@ from atst.models import (
def get_resources_from_context(view_args):
query = None
if view_args is None:
view_args = {}
if "portfolio_token" in view_args:
query = (
db.session.query(Portfolio)