From e1b29eafbd0b6285b7bea2e24709c7622d41173d Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Tue, 30 Jun 2020 14:04:11 +0200 Subject: Fix all violations --- web-server/opendc/models/topology.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web-server/opendc/models/topology.py') diff --git a/web-server/opendc/models/topology.py b/web-server/opendc/models/topology.py index 1447af98..1c717221 100644 --- a/web-server/opendc/models/topology.py +++ b/web-server/opendc/models/topology.py @@ -18,7 +18,7 @@ class Topology(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.obj['simulationId']), - user.obj['authorizations'])) + authorizations = list( + filter(lambda x: str(x['simulationId']) == str(self.obj['simulationId']), user.obj['authorizations'])) if len(authorizations) == 0 or (edit_access and authorizations[0]['authorizationLevel'] == 'VIEW'): raise ClientError(Response(403, "Forbidden from retrieving topology.")) -- cgit v1.2.3