Changeset 1609:af3fc2158202
- 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
| r1608 |
r1609 |
|
| 189 | 189 | |
|---|
| 190 | 190 | 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? |
|---|
| 192 | 192 | self._metadata_collection = MetadataCollection( self ) |
|---|
| 193 | 193 | return self._metadata_collection |
|---|