[Zope3-checkins] CVS: Zope3/src/zope/app/services - principalannotation.py:1.9.24.2

Jim Fulton jim at zope.com
Tue Sep 9 15:52:47 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv12136/src/zope/app/services

Modified Files:
      Tag: parentgeddon-branch
	principalannotation.py 
Log Message:
got more tests to pass on branch

=== Zope3/src/zope/app/services/principalannotation.py 1.9.24.1 => 1.9.24.2 ===
--- Zope3/src/zope/app/services/principalannotation.py:1.9.24.1	Mon Sep  8 14:21:47 2003
+++ Zope3/src/zope/app/services/principalannotation.py	Tue Sep  9 14:52:16 2003
@@ -31,6 +31,7 @@
      import IPrincipalAnnotationService
 from zope.app.interfaces.services.service import ISimpleService
 from zope.app.container.contained import Contained
+from zope.app.location import Location
 
 class PrincipalAnnotationService(Persistent, Contained):
     """Stores IAnnotations for IPrinicipals.
@@ -63,6 +64,8 @@
         annotations = self.annotations.get(principalId)
         if annotations is None:
             annotations = Annotations(principalId, store=self.annotations)
+            annotations.__parent__ = self
+            annotations.__name__ = principalId
 
         return annotations
 
@@ -72,7 +75,7 @@
         return principal.getId() in self.annotations
 
 
-class Annotations(Persistent):
+class Annotations(Persistent, Location):
     """Stores annotations."""
 
     implements(IAnnotations)




More information about the Zope3-Checkins mailing list