no need to cache this, we have select_related

This commit is contained in:
Laura Klünder 2017-06-22 20:14:32 +02:00
parent e2d6879716
commit dee040734c

View file

@ -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)