# HG changeset patch --
Bitbucket.org
# Project galaxy-dist
# URL
http://bitbucket.org/galaxy/galaxy-dist/overview
# User Nate Coraor <nate(a)bx.psu.edu>
# Date 1277740771 14400
# Node ID eea2c040ccb7bd0d2a7c6e5eab8e65f98a163009
# Parent c37eed98f8c974d7591db0b845a515c731d00787
Bugfix: If a LibraryDataset does not have an associated LDDA (this should not be possible
but apparently has happened), supress an exception in the library browser that prevents
viewing the library at all.
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -959,16 +959,16 @@ class LibraryFolder( object ):
intermed.sort()
return map( operator.getitem, intermed, ( -1, ) * len( intermed ) )
# This needs to be a list
- active_library_datasets = [ ld for ld in self.datasets if not
ld.library_dataset_dataset_association.deleted ]
+ active_library_datasets = [ ld for ld in self.datasets if
ld.library_dataset_dataset_association and not
ld.library_dataset_dataset_association.deleted ]
return sort_by_attr( [ ld for ld in active_library_datasets ], 'name' )
@property
def activatable_library_datasets( self ):
# This needs to be a list
- return [ ld for ld in self.datasets if not
ld.library_dataset_dataset_association.dataset.deleted ]
+ return [ ld for ld in self.datasets if ld.library_dataset_dataset_association and
not ld.library_dataset_dataset_association.dataset.deleted ]
@property
def active_datasets( self ):
# This needs to be a list
- return [ ld.library_dataset_dataset_association.dataset for ld in self.datasets
if not ld.library_dataset_dataset_association.deleted ]
+ return [ ld.library_dataset_dataset_association.dataset for ld in self.datasets
if ld.library_dataset_dataset_association and not
ld.library_dataset_dataset_association.deleted ]
def get_display_name( self ):
# Library folder name can be either a string or a unicode object. If string,
# convert to unicode object assuming 'utf-8' format.