From eb82c4b678d60d74816d46df0f3b18b1760b7c6e Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Tue, 30 Jun 2020 19:33:19 +0200 Subject: Revamp web server instructions --- web-server/opendc/models/simulation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web-server/opendc/models/simulation.py') diff --git a/web-server/opendc/models/simulation.py b/web-server/opendc/models/simulation.py index dbe1e800..86aa4726 100644 --- a/web-server/opendc/models/simulation.py +++ b/web-server/opendc/models/simulation.py @@ -17,8 +17,8 @@ class Simulation(Model): :param edit_access: True when edit access should be checked, otherwise view access. """ user = User.from_google_id(google_id) - authorizations = list( - filter(lambda x: str(x['simulationId']) == str(self.get_id()), user.obj['authorizations'])) + authorizations = list(filter(lambda x: str(x['simulationId']) == str(self.get_id()), + user.obj['authorizations'])) if len(authorizations) == 0 or (edit_access and authorizations[0]['authorizationLevel'] == 'VIEW'): raise ClientError(Response(403, "Forbidden from retrieving simulation.")) -- cgit v1.2.3