defer Level.render_data when querying by locationslug
This commit is contained in:
parent
92f0ffe6fd
commit
ef340c5193
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ class LocationSlugManager(models.Manager):
|
||||||
if self.model == LocationSlug:
|
if self.model == LocationSlug:
|
||||||
result = result.select_related(*(model._meta.default_related_name
|
result = result.select_related(*(model._meta.default_related_name
|
||||||
for model in get_submodels(Location)+[LocationRedirect]))
|
for model in get_submodels(Location)+[LocationRedirect]))
|
||||||
return result
|
return result.defer('levels__render_data')
|
||||||
|
|
||||||
def select_related_target(self):
|
def select_related_target(self):
|
||||||
if self.model != LocationSlug:
|
if self.model != LocationSlug:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue