Skip to content

Commit

Permalink
update data type str representation to say what area type
Browse files Browse the repository at this point in the history
mostly useful in the admin interface
  • Loading branch information
struan committed Jan 11, 2024
1 parent 40705e8 commit e22c045
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hub/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,14 @@ class DataType(TypeMixin, ShaderMixin, models.Model):
)

def __str__(self):
name = self.name
if self.label:
return self.label
name = self.label

return self.name
if self.area_type:
return f"{name} ({self.area_type})"

return name

def update_average(self):
average = (
Expand Down

0 comments on commit e22c045

Please sign in to comment.