decode_id

This commit is contained in:
j 2011-11-06 20:36:35 +01:00
commit 0feace7a8b
9 changed files with 39 additions and 14 deletions

View file

@ -4,7 +4,9 @@ from django.db.models import Q, Manager
from django.conf import settings
from ox.django.query import QuerySet
import ox
from item.utils import decode_id
def parseCondition(condition, user):
'''
@ -58,7 +60,7 @@ def parseCondition(condition, user):
else:
return q
if k.endswith('__id'):
v = ox.from26(v)
v = decode_id(v)
if isinstance(v, bool): #featured and public flag
key = k
elif k in ('lat', 'lng', 'area', 'south', 'west', 'north', 'east', 'matches',