If a document is linked to by another doc, prevent the deletion of the doc until all linked docs are no longer linking to it.
Alternatively, just warn the user what they're doing will break stuff
This really ought to be part of the standard payload spec IMO
If a document is linked to by another doc, prevent the deletion of the doc until all linked docs are no longer linking to it.
**Alternatively, just warn the user what they're doing will break stuff**
*This really ought to be part of the standard payload spec IMO*
tma
added the backend label 2024-06-19 16:54:53 +00:00
In fact, it is coming as an official feature in the future.
In the meantime careful typechecking on the frontend will have to suffice
I'm thankfully not the first to identify this problem:
- https://github.com/iamacup/payload-relationship-enhancer
- https://github.com/w41x/payload-bidirectional-relationships-plugin
- https://gist.github.com/DanRibbens/438a64157553c5d954e3da3d579f0808
In fact, it is coming as an official feature in the future.
In the meantime careful typechecking on the frontend will have to suffice
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
If a document is linked to by another doc, prevent the deletion of the doc until all linked docs are no longer linking to it.
Alternatively, just warn the user what they're doing will break stuff
This really ought to be part of the standard payload spec IMO
I'm thankfully not the first to identify this problem:
In fact, it is coming as an official feature in the future.
In the meantime careful typechecking on the frontend will have to suffice