1. pombredanne
  2. christchurch_django


Luke Plant  committed 4ac0f1b

Fixed crasher with 'upcoming midweek' view

  • Participants
  • Parent commits 4c918d6
  • Branches default

Comments (0)

Files changed (1)

File christchurch/views.py

View file
  • Ignore whitespace
     def __cmp__(self, other):
         if type(self.start) != type(other.start):
             # Cope with 'date' objects by converting both to 'date'
-            return cmp(self.start.date if hasattr(self.start, 'date') else self.start,
-                       other.start.date if hasattr(other.start, 'date') else other.start)
+            return cmp(self.start.date() if hasattr(self.start, 'date') else self.start,
+                       other.start.date() if hasattr(other.start, 'date') else other.start)
             return cmp(self.start, other.start)