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 10, 2024
1 parent de7e80c commit b257c24
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})"

Check warning on line 438 in hub/models.py

View check run for this annotation

Codecov / codecov/patch

hub/models.py#L438

Added line #L438 was not covered by tests

return name

def update_average(self):
average = (
Expand Down

0 comments on commit b257c24

Please sign in to comment.