change location color priority
This commit is contained in:
parent
c4412ba4e4
commit
84ebce2e0d
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ class Location(LocationSlug, EditorFormMixin, models.Model):
|
||||||
def get_color(self):
|
def get_color(self):
|
||||||
if self.color:
|
if self.color:
|
||||||
return self.color
|
return self.color
|
||||||
color_group = self.groups.filter(color__isnull=False).order_by('-compiled_area', '-compiled_room').first()
|
color_group = self.groups.filter(color__isnull=False).order_by('compiled_area', 'compiled_room').first()
|
||||||
if color_group:
|
if color_group:
|
||||||
return color_group.color
|
return color_group.color
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue