From bfcf25e24029304e9d334f2827b58dfd8d2a9f1f Mon Sep 17 00:00:00 2001 From: j Date: Fri, 20 Jan 2017 13:00:04 +0100 Subject: [PATCH] fold clips --- pandora/clip/managers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora/clip/managers.py b/pandora/clip/managers.py index c5ba351f..b3658b7e 100644 --- a/pandora/clip/managers.py +++ b/pandora/clip/managers.py @@ -189,6 +189,9 @@ class ClipManager(Manager): user) if conditions: qs = qs.filter(conditions) + + qs = qs.distinct() + if 'keys' in data: layer_ids = [k['id'] for k in settings.CONFIG['layers']] for l in filter(lambda k: k in layer_ids, data['keys']):