Produces the dict pyramid will use to render the form.
'''
response = super().write(result, errors)
- if ('havecreds' not in response
- or ('havecreds' in response and not response['havecreds'])):
+ if response.get('havecreds', False):
+ response['user'] = self['user']
+ else:
# We don't know if the credentials are good or
# we know they are bad. Keep them out of the session.
response['user'] = ''
response['password'] = ''
self.session_put('user', '')
self.session_put('password', '')
- else:
- response['user'] = self['user']
return response