Hello,
bitten recently by a nasty bug in cartridge.shop.forms.OrderForm subclass,
hiding behind strange exceptions propagation in Cartridge.
By an unknown reason, exception raised in OrderForm methods is silenced,
ie. code after exception is not run without being noticed. You may test it
yourself, just modify the .clean method like bellow:
class OrderForm(FormsetForm, DiscountForm):
def clean(self): """ Raise ``ValidationError`` if any errors
have been assigned externally, via one of the custom checkout step
handlers. """
raise AttributeError('This should not pass !!')
# code bellow won't run, exception is not propagated
if self._checkout_errors: raise
forms.ValidationError(self._checkout_errors) return super(OrderForm,
self).clean()
https://bitbucket.org/stephenmcd/cartridge/src/47c89ce915559d7e4d3bc264824a1a617b14ee98/cartridge/shop/forms.py?at=default#forms.py-424
Do I miss something here, is this a documented behavior ?
I can't yet see anything from in OrderForm ancestors. Mezzanine.pages forms
do not silence AttributeError, it seems to be specific for Cartridge
project.
Is this a work of some middleware ?
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.