forked from 0x2620/pandora
allow find for id
This commit is contained in:
parent
ab40deea27
commit
ecc8d139f6
1 changed files with 3 additions and 1 deletions
|
@ -66,6 +66,7 @@ class MovieManager(Manager):
|
|||
conditions = []
|
||||
for condition in data['query']['conditions']:
|
||||
k = condition.get('key', 'all')
|
||||
k = {'id': 'movieId'}.get(k, k)
|
||||
if not k: k = 'all'
|
||||
v = condition['value']
|
||||
op = condition.get('operator', None)
|
||||
|
@ -90,6 +91,7 @@ class MovieManager(Manager):
|
|||
k = '%s__iendswith' % k
|
||||
else: # elif op == '~':
|
||||
k = '%s__icontains' % k
|
||||
if not k.startswith('movieId'):
|
||||
k = 'find__%s' % k
|
||||
k = str(k)
|
||||
if exclude:
|
||||
|
|
Loading…
Reference in a new issue