Skip to content

Commit

Permalink
[#861] Use the .get() function to look for 'q'
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelbabu committed Jun 17, 2013
1 parent 655c2dd commit 067d430
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/logic/action/get.py
Expand Up @@ -1264,7 +1264,7 @@ def package_search(context, data_dict):
abort = data_dict.get('abort_search',False)

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

0 comments on commit 067d430

Please sign in to comment.