Changeset 1609:af3fc2158202

Show
Ignore:
Timestamp:
11/05/08 15:20:47 (2 months ago)
Author:
Dan Blankenberg <dan@bx.psu.edu>
branch:
default
Message:

A better test to ensure that a MetadataCollection? is not stale.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/galaxy/model/__init__.py

    r1608 r1609  
    189189 
    190190    def get_metadata( self ): 
    191         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? 
     191        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? 
    192192            self._metadata_collection = MetadataCollection( self ) 
    193193        return self._metadata_collection