fix get_color()
This commit is contained in:
parent
036a8bf607
commit
bd32896b95
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue