diff --git a/app/models.py b/app/models.py index ea79c0a..63a98a9 100644 --- a/app/models.py +++ b/app/models.py @@ -127,12 +127,12 @@ class Range(models.Model): db_table = 'range' def __str__(self): - return self.range_name if self else '--' + return self.range_name if self and self.range_name else '--' def dict(self): return { 'id': self.id, - 'name': self.name, + 'name': self.range_name, 'gmba_id': self.gmba_id, 'countries': self.countries, }