forked from 0x2620/pandora
decode_id
This commit is contained in:
parent
26a8e5be96
commit
0feace7a8b
9 changed files with 39 additions and 14 deletions
|
|
@ -4,6 +4,8 @@
|
|||
from django.db.models import Q, Manager
|
||||
from ox.django.query import QuerySet
|
||||
|
||||
from item.utils import decode_id
|
||||
|
||||
|
||||
def parseCondition(condition, user):
|
||||
k = condition.get('key', 'name')
|
||||
|
|
@ -19,6 +21,8 @@ def parseCondition(condition, user):
|
|||
exclude = True
|
||||
else:
|
||||
exclude = False
|
||||
if k == 'id':
|
||||
v = decode_id(v)
|
||||
|
||||
key = '%s%s' % (k, {
|
||||
'==': '__iexact',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue