Default error/success message for deletion sometimes seems incorrect

Hello ! :slight_smile:

Feature impacted

Error message displayed when there is an error on instance deletion

Observed behavior

Error message displayed when using action “Delete” doesn’t always match what’s happening in the database if there are callbacks and is different depending where the deletion is triggered from (from collection or from related data)

Example :
We have a model Invoice with a restrict_with_error dependency

If we directly access the instance from the Invoices collection and try to delete it then we have the expected error message

However if we access the instance from one of its relationships (Code virement in the screenshot) then we have a message saying that the instance is successfully deleted (but it’s not actually deleted which is the right behavior)

Expected behavior

We expect an error message to be displayed every time the record isn’t deleted.

Context

  • Project name: CulturePay
  • Environment name: Floating River
  • Agent technology: Rails (7.0.8.1)
  • Agent (forest package) name & version: forest_liana 8.3.1
  • Database type: PGSQL

Thanks !

Hello @DianeCP :wave: ,

I managed to reproduce the issue on my end.

I’m opening a ticket on our side and I’ll get back to you as soon as the patch is ready.

1 Like

Hello @DianeCP,

We have just released the fix on the new version 8.3.3.

1 Like

It’s working well, thanks a lot ! :slight_smile:

1 Like