[hg] galaxy 1595: Fix History.add_dataset() to be compatible wit...
details: http://www.bx.psu.edu/hg/galaxy/rev/56bc2f789894 changeset: 1595:56bc2f789894 user: Greg Von Kuster <greg@bx.psu.edu> date: Sat Nov 01 15:30:13 2008 -0400 description: Fix History.add_dataset() to be compatible with sqlalchemy 4. 1 file(s) affected in this change: lib/galaxy/model/__init__.py diffs (26 lines): diff -r 881ac57dcc81 -r 56bc2f789894 lib/galaxy/model/__init__.py --- a/lib/galaxy/model/__init__.py Fri Oct 31 15:21:30 2008 -0400 +++ b/lib/galaxy/model/__init__.py Sat Nov 01 15:30:13 2008 -0400 @@ -353,17 +353,18 @@ dataset = HistoryDatasetAssociation( dataset = dataset ) dataset.flush() elif not isinstance( dataset, HistoryDatasetAssociation ): - raise TypeError, "You can only add Dataset and HistoryDatasetAssociation instances to a history." + raise TypeError, "You can only add Dataset and HistoryDatasetAssociation instances to a history ( you tried to add %s )." % str( dataset ) if parent_id: for data in self.datasets: if data.id == parent_id: dataset.hid = data.hid break else: - if set_hid: dataset.hid = self._next_hid() + if set_hid: + dataset.hid = self._next_hid() else: - if set_hid: dataset.hid = self._next_hid() - dataset.history = self + if set_hid: + dataset.hid = self._next_hid() if genome_build not in [None, '?']: self.genome_build = genome_build self.datasets.append( dataset )
participants (1)
-
Greg Von Kuster