improve location api caching again and improve subtitles/descriptions

This commit is contained in:
Laura Klünder 2017-10-28 20:50:02 +02:00
parent 8beb6f9e8b
commit f83b77ed8b
4 changed files with 38 additions and 1 deletions

View file

@ -166,7 +166,7 @@ class SpecificLocation(Location, models.Model):
@property
def subtitle(self):
groups = tuple(self.groups.all())
return groups[0].title if groups else str(self.__class__._meta.verbose_name)
return groups[0].title if groups else self.__class__._meta.verbose_name
@cached_property
def order(self):