Commits

Matthew Schinckel  committed 032b34f

Allow the decimal_hours filter to work on None.

  • Participants
  • Parent commits ee0c46d

Comments (0)

Files changed (1)

File timedelta/templatetags/decimal_hours.py

 
 @register.filter(name='decimal_hours')
 def decimal_hours(value, decimal_places=None):
+    if value is None:
+        return value
     return dh(value, decimal_places)