Looking up g.portfolio when g.current_user is None raises an error
This commit is contained in:
parent
b71402955c
commit
15d4b48184
@ -96,7 +96,9 @@ def user_can_view(permission):
|
|||||||
|
|
||||||
|
|
||||||
def portfolio():
|
def portfolio():
|
||||||
if g.portfolio is not None:
|
if g.current_user is None:
|
||||||
|
return {}
|
||||||
|
elif g.portfolio is not None:
|
||||||
active_task_orders = [
|
active_task_orders = [
|
||||||
task_order for task_order in g.portfolio.task_orders if task_order.is_active
|
task_order for task_order in g.portfolio.task_orders if task_order.is_active
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user