year is no longer special case
This commit is contained in:
parent
cbf25a6f6f
commit
4b7be5402a
1 changed files with 1 additions and 4 deletions
|
@ -212,10 +212,7 @@ Positions
|
||||||
|
|
||||||
elif 'range' in data:
|
elif 'range' in data:
|
||||||
qs = qs[query['range'][0]:query['range'][1]]
|
qs = qs[query['range'][0]:query['range'][1]]
|
||||||
if name == 'year':
|
response['data']['items'] = [{'name': i[name], 'items': i[items]} for i in qs]
|
||||||
response['data']['items'] = [{'name': i.year, 'items': i.movies} for i in qs]
|
|
||||||
else:
|
|
||||||
response['data']['items'] = [{'name': i[name], 'items': i[items]} for i in qs]
|
|
||||||
else:
|
else:
|
||||||
response['data']['items'] = qs.count()
|
response['data']['items'] = qs.count()
|
||||||
elif 'ids' in query:
|
elif 'ids' in query:
|
||||||
|
|
Loading…
Reference in a new issue