From b628e4f73af90c12b6e3de8ee40c90ca5733638e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20=C3=96stberg?= Date: Thu, 20 Dec 2018 18:24:42 +0100 Subject: [PATCH] Fix crash when checking is_admin --- backend/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/application.py b/backend/application.py index 0f6f4f7d5..c798b3b3e 100644 --- a/backend/application.py +++ b/backend/application.py @@ -103,7 +103,7 @@ def get(self): if dataset_version.available_from > datetime.now(): # If it's not available yet, only return if user is admin. - if not (self.current_user and self.current_user.is_admin(version.dataset)): + if not (self.current_user and self.current_user.is_admin(dataset_version.dataset)): self.send_error(status_code=403) base_url = "%s://%s" % (self.request.protocol, self.request.host)