Avoid modified packages to jump to the first position

This commit is contained in:
Aitor Magán 2015-06-30 13:13:31 +02:00
parent 4eb13dcc65
commit 3359252c6a
1 changed files with 3 additions and 1 deletions

View File

@ -218,8 +218,10 @@ class PrivateDatasets(p.SingletonPlugin, tk.DefaultDatasetForm):
'validate': False,
'use_cache': False},
{'id': package_id})
# Prevent acquired datasets jumping to the first position
# new_pkg_dict['metadata_modified'] = new_pkg_dict.get('revision_timestamp', '')
revision = tk.get_action('revision_show')({'ignore_auth': True}, {'id': new_pkg_dict['revision_id']})
new_pkg_dict['metadata_modified'] = revision.get('timestamp', '')
self.indexer.update_dict(new_pkg_dict)
return pkg_dict