mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
Rails validation doesn't handle unique validation for soft deleted object. So we rescue the exception raise by the database and display a nice error message. We don't want an enterprise to be able to reuse a code in case the voucher get reactivated.