mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Ensure that label key exists before attempting removal
This commit is contained in:
@@ -1020,7 +1020,7 @@ def _filter_for_panel( item, item_type, filters, context ):
|
||||
elif section_item_type == panel_item_types.LABEL:
|
||||
# If there is a label and it does not have tools,
|
||||
# remove it.
|
||||
if ( cur_label_key and not tools_under_label ) or not _apply_filter( section_item, filters[ 'label' ] ):
|
||||
if cur_label_key and ( not tools_under_label or not _apply_filter( section_item, filters[ 'label' ] ) ):
|
||||
del filtered_elems[ cur_label_key ]
|
||||
|
||||
# Reset attributes for new label.
|
||||
|
||||
Reference in New Issue
Block a user