Comment 1 for bug 859714

Revision history for this message
Gediminas Paulauskas (menesis) wrote :

The offending code is in intervention/browser/widgets.py, line 219:

    def getInputValue(self):
        """See zope.formlib.interfaces.IInputWidget"""
        contacts = self.getRequestValue()
        if not contacts and self.enabled:
            self._error = MissingInputError.__doc__
            raise MissingInputError('', '')
        return contacts

    def hasValidInput(self):
        """See zope.formlib.interfaces.IInputWidget"""
        return bool(self.getInputValue())

So this happens when the email server is enabled, but there are no persons responsible selected. Maybe I had old data that could be made incorrect like this, or evolution did not do something needed.

But this exception happens not when one tries to save with not all required fields filled, but on showing the page.

The raise MissingInputError('', '') line is strange, but anyway this exception is not caught correctly and an old-style empty page is being displayed, but this fails again.

But this code works in the old skin intervention. Only not in flourish.

The problem is that extract() gets an exception and does not know what to do with it. Changing to

    def extract(self):
        return self.getRequestValue()

Avoids this exception.