# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User jeremy goecks <jeremy.goecks@emory.edu> # Date 1286830980 14400 # Node ID f91906133f451758b4be3c711bf1ce85c6d9650b # Parent 9ddd7c1d4dd5075a0878026e59cf04f3d9d768d6 Fix bug in 9ddd7c1d4dd5 that prevented data provider from being set correctly. --- a/lib/galaxy/visualization/tracks/data_providers.py +++ b/lib/galaxy/visualization/tracks/data_providers.py @@ -385,15 +385,14 @@ def get_data_provider( name=None, origin data_provider = value elif original_dataset: # Look for data provider in mapping. - data_provider = \ - dataset_type_to_data_provider.get( original_dataset.datatype.__class__, None ) - - # If get_track_type is available, then dataset can be added to trackster - # and hence has at least a generic data provider. - try: - original_dataset.datatype.get_track_type() - data_provider = TracksDataProvider - except: - pass + data_provider = dataset_type_to_data_provider.get( original_dataset.datatype.__class__, None ) + if not data_provider: + # If get_track_type is available, then dataset can be added to trackster + # and hence has at least a generic data provider. + try: + original_dataset.datatype.get_track_type() + data_provider = TracksDataProvider + except: + pass return data_provider