[hg] galaxy 1608: Possible fix for the infinite metadata recursi...
details: http://www.bx.psu.edu/hg/galaxy/rev/53aa8d34c20a changeset: 1608:53aa8d34c20a user: Dan Blankenberg <dan@bx.psu.edu> date: Wed Nov 05 11:43:22 2008 -0500 description: Possible fix for the infinite metadata recursion issue. 1 file(s) affected in this change: lib/galaxy/model/__init__.py diffs (12 lines): diff -r 4e2ad77de095 -r 53aa8d34c20a lib/galaxy/model/__init__.py --- a/lib/galaxy/model/__init__.py Wed Nov 05 10:35:06 2008 -0500 +++ b/lib/galaxy/model/__init__.py Wed Nov 05 11:43:22 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' ): + 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? self._metadata_collection = MetadataCollection( self ) return self._metadata_collection def set_metadata( self, bunch ):
participants (1)
-
Greg Von Kuster