bug fix: handle id of non-existing client correctly
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3753 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
945857c650
commit
129753cdf7
1 changed files with 4 additions and 3 deletions
|
@ -620,6 +620,7 @@ class RegistrationTemplateView(BaseView):
|
|||
|
||||
def update(self):
|
||||
newClient = False
|
||||
client = None
|
||||
form = self.request.form
|
||||
clientName = self.getClientName()
|
||||
if not form.get('action'):
|
||||
|
@ -627,9 +628,9 @@ class RegistrationTemplateView(BaseView):
|
|||
manager = self.context.getManager()
|
||||
if clientName:
|
||||
client = manager.getClients().get(clientName)
|
||||
if client is None:
|
||||
return True
|
||||
else:
|
||||
#if client is None:
|
||||
# return True
|
||||
if client is None:
|
||||
client = IClientFactory(manager)()
|
||||
newClient = True # make persistent later
|
||||
regs = self.state = IClientRegistrations(client)
|
||||
|
|
Loading…
Add table
Reference in a new issue