From a89e654c6da3c34220fb62d0e5f5be7299133d9e Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 3 Mar 2013 14:46:37 +0000 Subject: [PATCH] fix queries in smart lists --- pandora/item/managers.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora/item/managers.py b/pandora/item/managers.py index 455675173..f760aeceb 100644 --- a/pandora/item/managers.py +++ b/pandora/item/managers.py @@ -229,12 +229,12 @@ def parseConditions(conditions, operator, user): if 'conditions' in condition: q = parseConditions(condition['conditions'], condition.get('operator', '&'), user) - if isinstance(q, list): - conn += q - elif q: - conn.append(q) else: - conn.append(parseCondition(condition, user)) + q = parseCondition(condition, user) + if isinstance(q, list): + conn += q + elif q: + conn.append(q) if conn: if operator == '|': q = conn[0]