Skip to content

Commit

Permalink
Fix for type abbrev. Closes #304 (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
aih committed Apr 14, 2021
1 parent 3d78df2 commit 2d6194f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server_py/flatgov/bills/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from iteration_utilities import flatten
from django.utils.translation import gettext_lazy as _

from bills.templatetags.bill_filters import stagesFormat

MAX_RELATED_BILLS = 30

class Bill(models.Model):
Expand Down Expand Up @@ -35,7 +37,10 @@ def __str__(self):
return self.bill_congress_type_number

def get_type_abbrev(self) -> str:
return ''.join([letter.upper() + '.' for letter in self.type])
if self.type:
return stagesFormat.get(self.type.upper(), '')
else:
return ''

def get_related_bill_numbers(self):
return self.related_dict.keys()
Expand Down

0 comments on commit 2d6194f

Please sign in to comment.