get modified from sort table, fixes #1018
This commit is contained in:
parent
80a242ee49
commit
547601d7a3
1 changed files with 5 additions and 1 deletions
|
@ -243,6 +243,8 @@ Positions
|
||||||
for p in _p:
|
for p in _p:
|
||||||
if p == 'accessed':
|
if p == 'accessed':
|
||||||
r[p] = m.sort.accessed or ''
|
r[p] = m.sort.accessed or ''
|
||||||
|
elif p == 'modified':
|
||||||
|
r[p] = m.sort.modified
|
||||||
elif p == 'timesaccessed':
|
elif p == 'timesaccessed':
|
||||||
r[p] = m.sort.timesaccessed
|
r[p] = m.sort.timesaccessed
|
||||||
else:
|
else:
|
||||||
|
@ -261,7 +263,9 @@ Positions
|
||||||
return r
|
return r
|
||||||
qs = qs[query['range'][0]:query['range'][1]]
|
qs = qs[query['range'][0]:query['range'][1]]
|
||||||
#response['data']['items'] = [m.get_json(_p) for m in qs]
|
#response['data']['items'] = [m.get_json(_p) for m in qs]
|
||||||
if 'viewed' in _p or 'timesaccessed' in _p or 'accessed' in _p:
|
if filter(lambda p: p in (
|
||||||
|
'accessed', 'modified', 'timesaccessed', 'viewed'
|
||||||
|
), _p):
|
||||||
qs = qs.select_related()
|
qs = qs.select_related()
|
||||||
response['data']['items'] = [only_p_sums(m) for m in qs]
|
response['data']['items'] = [only_p_sums(m) for m in qs]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue