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):
|
def update(self):
|
||||||
newClient = False
|
newClient = False
|
||||||
|
client = None
|
||||||
form = self.request.form
|
form = self.request.form
|
||||||
clientName = self.getClientName()
|
clientName = self.getClientName()
|
||||||
if not form.get('action'):
|
if not form.get('action'):
|
||||||
|
@ -627,9 +628,9 @@ class RegistrationTemplateView(BaseView):
|
||||||
manager = self.context.getManager()
|
manager = self.context.getManager()
|
||||||
if clientName:
|
if clientName:
|
||||||
client = manager.getClients().get(clientName)
|
client = manager.getClients().get(clientName)
|
||||||
|
#if client is None:
|
||||||
|
# return True
|
||||||
if client is None:
|
if client is None:
|
||||||
return True
|
|
||||||
else:
|
|
||||||
client = IClientFactory(manager)()
|
client = IClientFactory(manager)()
|
||||||
newClient = True # make persistent later
|
newClient = True # make persistent later
|
||||||
regs = self.state = IClientRegistrations(client)
|
regs = self.state = IClientRegistrations(client)
|
||||||
|
|
Loading…
Add table
Reference in a new issue