From 2f19eb1bd193d0cb70085f87bf4e20d57e257967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 19 Feb 2020 16:35:56 +0100 Subject: [PATCH] misc: don't use direct attribute access in search rendering (#40035) --- combo/data/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/combo/data/models.py b/combo/data/models.py index 68255c9c..66d297f6 100644 --- a/combo/data/models.py +++ b/combo/data/models.py @@ -727,7 +727,7 @@ class CellBase(six.with_metaclass(CellMeta, models.Model)): context.''' return True - def is_user_dependant(self, context): + def is_user_dependant(self, context=None): '''Return whether the cell content varies from user to user.''' return self.user_dependant @@ -754,7 +754,7 @@ class CellBase(six.with_metaclass(CellMeta, models.Model)): def render_for_search(self): if not self.is_enabled(): return '' - if self.user_dependant: + if self.is_user_dependant(): return '' request = RequestFactory().get(self.page.get_online_url()) request.user = None # compat