twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
GNU Affero General Public License v3.0
16.04k stars 1.81k forks source link

Impossible to update soft-deleted record #7172

Open FelixMalfait opened 2 weeks ago

FelixMalfait commented 2 weeks ago

In the UI it's possible to edit a soft-deleted record but the backend refuses it.

sid0-0 commented 1 week ago

I see that this is marked as a backend issue, but soft deleted records should not be editable, right? I believe the fix should be to block editing of soft deleted items from frontend.

FelixMalfait commented 1 week ago

@sid0-0 I was thinking it'd be best to leave it editable on fix it on the backend yes. Because for example when we introduce unicity constraints then it would allow the person to edit the email and restore the record even though there's a conflict.

But I'm not against a pure-frontend solution making it readonly, only if it's elegant code. I don't know that part of the codebase well enough to know if it's possible to do someting elegant across the app or if that implies refactoring the read-only implementation