Should get the objects and not the Manager
This commit is contained in:
parent
236e40d359
commit
65f777f00f
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue