bug fix: link to DataTemplate if no RegistrationTemplate present

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2018 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2007-09-07 17:35:28 +00:00
parent 5fd78bccca
commit 809a06d3ab

View file

@ -86,11 +86,14 @@ class ServiceManagerView(BaseView):
""" Find a registration template that provides the registration
for the service given.
"""
first = None
for tpl in self.context.getClientSchemas():
if first is None:
first = tpl
if IRegistrationTemplate.providedBy(tpl):
# TODO: check that service is really provided by this template
return tpl
return None
return first
def overview(self, includeCategories=None):
result = []