diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-06-30 14:04:11 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:42:29 +0200 |
| commit | e1b29eafbd0b6285b7bea2e24709c7622d41173d (patch) | |
| tree | 5f923cdf2a3ff2fc271a73a03c6513d06853f6bb /web-server/opendc/models | |
| parent | 1c58ae3b25120ac670b897665bac7d8f18156220 (diff) | |
Fix all violations
Diffstat (limited to 'web-server/opendc/models')
| -rw-r--r-- | web-server/opendc/models/topology.py | 4 |
1 files changed, 2 insertions, 2 deletions
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.")) |
