no need to cache this, we have select_related
This commit is contained in:
parent
e2d6879716
commit
dee040734c
1 changed files with 0 additions and 1 deletions
|
@ -33,7 +33,6 @@ class LocationSlug(SerializableMixin, models.Model):
|
|||
objects = LocationSlugManager()
|
||||
|
||||
def get_child(self):
|
||||
# todo: cache this
|
||||
for model in get_submodels(Location)+[LocationRedirect]:
|
||||
with suppress(AttributeError):
|
||||
return getattr(self, model._meta.default_related_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue