From 65f777f00f35487f80ca3fcd30b98889a1b8de6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Oudin?= Date: Mon, 26 Feb 2018 15:04:26 +0100 Subject: [PATCH] Should get the objects and not the Manager --- profiles/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profiles/models.py b/profiles/models.py index 2a4c943..25144e0 100644 --- a/profiles/models.py +++ b/profiles/models.py @@ -94,10 +94,10 @@ class Website(models.Model): if user.uses_urls: url = self.url elif rand <= 0.1: - url = random.choice(self.notable_pages).url + url = random.choice(self.notable_pages.all()).url elif rand <= 0.8: search_term_text = self.name + " " + \ - random.choice(self.keywords) + random.choice(self.keywords.all()) url = user.search_engine.search_url(search_term_text) else: url = user.search_engine.search_url(self.name)