[Commits] (vajda) fixed the root cause of http://bugzilla.osafoundation.org/show_bug.cgi?id=1710

commits at osafoundation.org commits at osafoundation.org
Wed Aug 4 14:44:18 PDT 2004


Commit by: vajda
Modified files:
chandler/repository/item/ItemRef.py 1.85 1.86

Log message:
fixed the root cause of http://bugzilla.osafoundation.org/show_bug.cgi?id=1710

ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/repository/item/ItemRef.py.diff?r1=text&tr1=1.85&r2=text&tr2=1.86

Index: chandler/repository/item/ItemRef.py
diff -u chandler/repository/item/ItemRef.py:1.85 chandler/repository/item/ItemRef.py:1.86
--- chandler/repository/item/ItemRef.py:1.85	Tue Aug  3 17:10:24 2004
+++ chandler/repository/item/ItemRef.py	Wed Aug  4 14:44:17 2004
@@ -1,6 +1,6 @@
 
-__revision__  = "$Revision: 1.85 $"
-__date__      = "$Date: 2004/08/04 00:10:24 $"
+__revision__  = "$Revision: 1.86 $"
+__date__      = "$Date: 2004/08/04 21:44:17 $"
 __copyright__ = "Copyright (c) 2002 Open Source Applications Foundation"
 __license__   = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -691,20 +691,21 @@
                     load=True):
 
         loading = self._getRepository().isLoading()
-        if not loading:
-            self._changeRef(key)
-
         if loading and previousKey is None and nextKey is None:
             ref = self._loadRef(key)
             if ref is not None:
                 previousKey, nextKey, alias = ref
         
         old = super(RefDict, self).get(key, None, load)
+        if not loading:
+            self._changeRef(key)
+
         if old is not None:
             item = self._getItem()
             if type(value) is ItemRef:
-                old.detach(item, self._name,
-                           old.other(item), self._otherName)
+                if value is not old:
+                    old.detach(item, self._name,
+                               old.other(item), self._otherName)
             else:
                 if value is not old.other(item):
                     self._getRepository().logger.warning('Warning: reattaching %s for %s on %s',



More information about the Commits mailing list