From 08d0404e9c05e1e26fa50bf155805f0b22790aee Mon Sep 17 00:00:00 2001 From: Jonathan Rehm Date: Sun, 13 Aug 2017 07:05:45 -0700 Subject: [PATCH] Add mature_content property to Anonymous class --- cps/ub.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cps/ub.py b/cps/ub.py index 0f42ea0c..89c9cf28 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -167,13 +167,14 @@ class Anonymous(AnonymousUserMixin, UserBase): self.loadSettings() def loadSettings(self): - data = session.query(User).filter(User.role.op('&')(ROLE_ANONYMOUS) == ROLE_ANONYMOUS).first() + data = session.query(User).filter(User.role.op('&')(ROLE_ANONYMOUS) == ROLE_ANONYMOUS).first() # type: User settings = session.query(Settings).first() self.nickname = data.nickname self.role = data.role self.sidebar_view = data.sidebar_view self.default_language = data.default_language self.locale = data.locale + self.mature_content = data.mature_content self.anon_browse = settings.config_anonbrowse def role_admin(self):