Browse Source

Made read_minutes 1 minute min

Duncan Lock 11 years ago
parent
commit
2dd13f3fa0
1 changed files with 2 additions and 0 deletions
  1. 2 0
      post_stats/post_stats.py

+ 2 - 0
post_stats/post_stats.py

@@ -68,6 +68,8 @@ def calculate_stats(instance):
         stats['wc'] = sum(word_count.values())
         # stats['read_minutes'] = math.ceil(float(stats['wc']) / float(WPM))
         stats['read_minutes'] = (stats['wc'] + WPM - 1) // WPM
+        if stats['read_minutes'] == 0:
+            stats['read_minutes'] = 1
 
         instance.stats = stats
         instance.raw_text = raw_text