Skip to content

Commit

Permalink
Merge branch '861-order-by-dropdown'
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Jul 1, 2013
2 parents d456c5d + 067d430 commit cac55c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ckan/logic/action/get.py
Expand Up @@ -1312,7 +1312,10 @@ def package_search(context, data_dict):
data_dict['sort'] = 'score desc, metadata_modified desc'

if data_dict.get('sort') in (None, 'rank'):
data_dict['sort'] = 'score desc, metadata_modified desc'
if data_dict.get('q'):
data_dict['sort'] = 'score desc, metadata_modified desc'
else:
data_dict['sort'] = 'metadata_modified desc'

results = []
if not abort:
Expand Down

0 comments on commit cac55c6

Please sign in to comment.