From 8aa174e70c01631ae4e00a6d208966fcd77cf972 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Fri, 10 Jul 2020 10:21:46 +0200 Subject: Add implementation of portfolio and scenario UI structure --- web-server/opendc/models/scenario.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web-server/opendc/models') diff --git a/web-server/opendc/models/scenario.py b/web-server/opendc/models/scenario.py index d7d959ca..8d53e408 100644 --- a/web-server/opendc/models/scenario.py +++ b/web-server/opendc/models/scenario.py @@ -21,6 +21,6 @@ class Scenario(Model): portfolio = Portfolio.from_id(self.obj['portfolioId']) user = User.from_google_id(google_id) authorizations = list( - filter(lambda x: str(x['projectId']) == str(portfolio.get_id()), user.obj['authorizations'])) + filter(lambda x: str(x['projectId']) == str(portfolio.obj['projectId']), user.obj['authorizations'])) if len(authorizations) == 0 or (edit_access and authorizations[0]['authorizationLevel'] == 'VIEW'): raise ClientError(Response(403, 'Forbidden from retrieving/editing scenario.')) -- cgit v1.2.3