Skip to content

Commit

Permalink
Add __str__ method to AreaType
Browse files Browse the repository at this point in the history
This is to ensure urls work as expected
  • Loading branch information
alexander-griffen committed Oct 19, 2023
1 parent 9457f86 commit cd18ea4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hub/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,9 @@ class AreaType(models.Model):
area_type = models.CharField(max_length=50, choices=AREA_TYPES)
description = models.CharField(max_length=300)

def __str__(self):
return self.code


class DataType(TypeMixin, models.Model):
data_set = models.ForeignKey(DataSet, on_delete=models.CASCADE)
Expand Down

0 comments on commit cd18ea4

Please sign in to comment.