From a31d4737f82db3004249b644eccb6c1d9f461dff Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 12 Jan 2012 14:19:08 +0530 Subject: [PATCH] item by oshash --- pandora/item/managers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/item/managers.py b/pandora/item/managers.py index 14f6c312e..483b4dd32 100644 --- a/pandora/item/managers.py +++ b/pandora/item/managers.py @@ -64,6 +64,8 @@ def parseCondition(condition, user): elif k == 'filename' and (user.is_anonymous() or \ not user.get_profile().capability('canSeeFiles')): return Q(id=0) + elif k == 'oshash': + return Q(files__oshash=v) elif k == 'resolution': q = parseCondition({'key': 'width', 'value': v[0], 'operator': op}, user) \ & parseCondition({'key': 'height', 'value': v[1], 'operator': op}, user)