Commits

Lucas Magnum  committed 9266743

fail silently when the value is not a timedelta instance.

  • Participants
  • Parent commits 04467c7

Comments (0)

Files changed (1)

File timedelta/templatetags/timedelta.py

 
 @register.filter(name='as_hours')
 def as_hours(value, display="long"):
-    return _as_hours(value, display=display)
+    try:
+        return _as_hours(value, display=display)
+    except:
+        # fail silently
+        return ''