From 569428afb3b58c5b126aa1cb66d3b2f712c6489f Mon Sep 17 00:00:00 2001 From: Yan Date: Wed, 12 Oct 2016 13:32:02 +0300 Subject: [PATCH] [#2346] Dashboard_activity_list_html() dosen't pass user id Load more don't work on Dashboard page, because dashboard_activity_list_html() don't pass id as an argument, so in activity-stream.js the user_activity_list_html() gives us an error. Fix it by passing id from context as we do with model= context['model']. As a result context['user'] gives us the name of current user and we can use it, because user_activity_list_html() can take both id and username as id. --- ckan/logic/action/get.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ckan/logic/action/get.py b/ckan/logic/action/get.py index 3a6108ba3b7..e2e0a60b6a3 100644 --- a/ckan/logic/action/get.py +++ b/ckan/logic/action/get.py @@ -3349,11 +3349,13 @@ def dashboard_activity_list_html(context, data_dict): ''' activity_stream = dashboard_activity_list(context, data_dict) model = context['model'] + user_id = context['user'] offset = data_dict.get('offset', 0) extra_vars = { 'controller': 'user', 'action': 'dashboard', 'offset': offset, + 'id': user_id } return activity_streams.activity_list_to_html(context, activity_stream, extra_vars)