diff --git a/councilmatic_core/models.py b/councilmatic_core/models.py index 90ac2d1..e0885c4 100644 --- a/councilmatic_core/models.py +++ b/councilmatic_core/models.py @@ -1,5 +1,6 @@ import datetime import os +import pytz from django.db import models from django.contrib.gis.db import models as geo_models @@ -98,7 +99,7 @@ def sponsorship_sort(sponsorship): ''' Sponsorships of bills without recent action dates should appear last. ''' - return sponsorship.bill.last_action_date or datetime.date(datetime.MINYEAR, 1, 1) + return sponsorship.bill.last_action_date or pytz.utc.localize(datetime.date(datetime.MINYEAR, 1, 1)) return sorted((s for s in primary_sponsorships), key=sponsorship_sort, reverse=True)