fix get_color()

This commit is contained in:
Laura Klünder 2017-06-17 23:40:23 +02:00
parent 036a8bf607
commit bd32896b95

View file

@ -118,7 +118,7 @@ class Location(LocationSlug, EditorFormMixin, models.Model):
# dont filter in the query here so prefetch_related works
if instance is None:
instance = self
groups = [group for group in instance.groups.all() if group.color is not None]
groups = [group for group in instance.groups.all() if group.color]
if not groups:
return None
for group in groups: