From 28065b6ee7eaa15a7607c17316050939781b8cff Mon Sep 17 00:00:00 2001 From: Jelle Scholtalbers Date: Fri, 9 Oct 2015 13:01:40 +0200 Subject: [PATCH] Fix the issue where too many datasets are linked to a certain role and the page will not load - or takes too long for the proxy --- lib/galaxy/web/base/controllers/admin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/web/base/controllers/admin.py b/lib/galaxy/web/base/controllers/admin.py index a44ee1bf884..25b5ca05e02 100644 --- a/lib/galaxy/web/base/controllers/admin.py +++ b/lib/galaxy/web/base/controllers/admin.py @@ -315,7 +315,7 @@ class Admin( object ): else: out_groups.append( ( group.id, group.name ) ) library_dataset_actions = {} - if trans.webapp.name == 'galaxy': + if trans.webapp.name == 'galaxy' and len(role.dataset_actions) < 25: # Build a list of tuples that are LibraryDatasetDatasetAssociationss followed by a list of actions # whose DatasetPermissions is associated with the Role # [ ( LibraryDatasetDatasetAssociation [ action, action ] ) ] @@ -341,6 +341,9 @@ class Admin( object ): library_dataset_actions[ library ][ folder_path ].append( dp.action ) except: library_dataset_actions[ library ][ folder_path ] = [ dp.action ] + else: + message = "Not showing associated datasets, there are too many." + status = 'info' return trans.fill_template( '/admin/dataset_security/role/role.mako', role=role, in_users=in_users,