fix: show flash error message if resolve pending product fails
This commit is contained in:
parent
231ca0363a
commit
a0cd8835e0
|
@ -2563,7 +2563,14 @@ class PendingProductView(MasterView):
|
|||
app = self.get_rattail_app()
|
||||
products_handler = app.get_products_handler()
|
||||
kwargs = self.get_resolve_product_kwargs()
|
||||
products_handler.resolve_product(pending, product, self.request.user, **kwargs)
|
||||
|
||||
try:
|
||||
products_handler.resolve_product(pending, product, self.request.user, **kwargs)
|
||||
except Exception as error:
|
||||
log.warning("failed to resolve product", exc_info=True)
|
||||
self.request.session.flash(f"Resolve failed: {simple_error(error)}", 'error')
|
||||
return redirect
|
||||
|
||||
return redirect
|
||||
|
||||
def get_resolve_product_kwargs(self, **kwargs):
|
||||
|
|
Loading…
Reference in a new issue