From 02f787d062cd176f5d6fd0932b56bca75798cb41 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 25 Dec 2010 19:30:48 +0530 Subject: [PATCH] more defaults --- pandora/item/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/item/models.py b/pandora/item/models.py index 4e5f707c..312c7a3f 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -578,6 +578,8 @@ class Item(models.Model): s.cuts = len(self.data.get('cuts', [])) if s.duration: s.cutsperminute = s.cuts / (s.duration/60) + else: + s.cutsperminute = 0 for key in ('title', 'language', 'country') + self.person_keys: setattr(s, '%s_desc'%key, getattr(s, key)) if not getattr(s, key):