From 7331e9baf2cfe7bdfb24effcf0a4801da1e7ea4d Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Mon, 6 Jul 2020 08:43:42 +0200 Subject: Make tests consistent --- web-server/opendc/models/prefab.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'web-server/opendc/models/prefab.py') diff --git a/web-server/opendc/models/prefab.py b/web-server/opendc/models/prefab.py index a3611a11..ca9f0b3a 100644 --- a/web-server/opendc/models/prefab.py +++ b/web-server/opendc/models/prefab.py @@ -17,8 +17,7 @@ class Prefab(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['prefabId']) == str(self.get_id()), - user.obj['authorizations'])) + authorizations = list(filter(lambda x: str(x['prefabId']) == 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 prefab.")) -- cgit v1.2.3