Closed mm21 closed 1 year ago
Hello, this is a problem in validation in ETAPI. Relation's target note cannot be changed. If you do want to change it, you need to delete the old relation and create a new one.
(And problems with updating the state in various places is exactly the motivation to make properties with references to entities immutable)
Trilium Version
v0.60.1-beta
What operating system are you using?
Ubuntu
What is your setup?
Server access only
Operating System Version
Ubuntu 22.04 LTS
Description
When a relation target is updated by ETAPI, the corresponding backlink to the original note target doesn't seem to be updated even after the relation is deleted. Once the relation is deleted, there's an error popup in the frontend whenever the original target is selected in the UI.
Steps to reproduce:
As a workaround, the relation can be changed back to root before deleting. However I haven't found a way to fix the error popup after it has already been deleted. Issue isn't seen if the relation isn't updated before being deleted.
Error logs
Console output from backend:
The 500 GET error is seen in the frontend upon selecting the root note.