[hg] galaxy 1609: A better test to ensure that a MetadataCollect...
details: http://www.bx.psu.edu/hg/galaxy/rev/af3fc2158202 changeset: 1609:af3fc2158202 user: Dan Blankenberg <dan@bx.psu.edu> date: Wed Nov 05 15:20:47 2008 -0500 description: A better test to ensure that a MetadataCollection is not stale. 1 file(s) affected in this change: lib/galaxy/model/__init__.py diffs (12 lines): diff -r 53aa8d34c20a -r af3fc2158202 lib/galaxy/model/__init__.py --- a/lib/galaxy/model/__init__.py Wed Nov 05 11:43:22 2008 -0500 +++ b/lib/galaxy/model/__init__.py Wed Nov 05 15:20:47 2008 -0500 @@ -188,7 +188,7 @@ return datatypes_registry.get_datatype_by_extension( self.extension ) def get_metadata( self ): - if not hasattr( self, '_metadata_collection' ) or self._metadata_collection.parent is None: #using weakref to store parent (to prevent circ ref), does a Session.clear() cause parent to be invalidated, while still copying over this non-database attribute? + if not hasattr( self, '_metadata_collection' ) or self._metadata_collection.parent != self: #using weakref to store parent (to prevent circ ref), does a Session.clear() cause parent to be invalidated, while still copying over this non-database attribute? self._metadata_collection = MetadataCollection( self ) return self._metadata_collection def set_metadata( self, bunch ):
participants (1)
-
Greg Von Kuster