From 55fc0ccbfadd0214f656de5a9767bdeedd9f1d00 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 29 Oct 2011 01:35:01 +0200 Subject: [PATCH] return sort values for clips too --- pandora/clip/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora/clip/models.py b/pandora/clip/models.py index f5444356..696b6d98 100644 --- a/pandora/clip/models.py +++ b/pandora/clip/models.py @@ -88,7 +88,10 @@ class Clip(models.Model): for a in self.annotations.filter(layer__name=layer)] for key in keys: if key not in clip_keys and key not in j: - j[key] = self.item.get(key) + value = self.item.get(key) + if not value and hasattr(self.item.sort, key): + value = getattr(self.item.sort, key) + j[key] = value return j @classmethod