[Zope3-checkins] CVS: Zope3/src/zope/app/services - configure.zcml:1.46 registration.py:1.6
Fred L. Drake, Jr.
fred@zope.com
Wed, 2 Jul 2003 15:15:34 -0400
Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv874/app/services
Modified Files:
configure.zcml registration.py
Log Message:
Make the utility registration pages work again.
=== Zope3/src/zope/app/services/configure.zcml 1.45 => 1.46 ===
--- Zope3/src/zope/app/services/configure.zcml:1.45 Mon Jun 30 12:24:58 2003
+++ Zope3/src/zope/app/services/configure.zcml Wed Jul 2 15:14:58 2003
@@ -265,7 +265,7 @@
<require
permission="zope.ManageServices"
interface="zope.app.interfaces.container.IWriteContainer"
- attributes="getRegistrationManager"
+ attributes="getRegistrationManager resolve"
/>
<implements
interface="zope.app.interfaces.annotation.IAttributeAnnotatable" />
=== Zope3/src/zope/app/services/registration.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/services/registration.py:1.5 Tue Jul 1 18:05:42 2003
+++ Zope3/src/zope/app/services/registration.py Wed Jul 2 15:14:58 2003
@@ -268,18 +268,21 @@
sm = zapi.getServiceManager(wrapped_self)
data = wrapped_self._data
- if not data and keep_dummy:
+ if None not in data:
data += (None,)
result = [{'id': path or "",
'active': False,
'registration': (path and zapi.traverse(sm, path))
}
- for path in data if path or keep_dummy
+ for path in data
]
- if keep_dummy or (result and result[0]['registration'] is not None):
- result[0]['active'] = True
+ result[0]['active'] = True
+
+ if not keep_dummy:
+ # Throw away dummy:
+ result = [x for x in result if x['id']]
return result
info = zapi.ContextMethod(info)