uwazi icon indicating copy to clipboard operation
uwazi copied to clipboard

Check relationType existence while saving relationships

Open LaszloKecskes opened this issue 11 months ago • 1 comments

Currently, the relationship saving only performs a format check to make sure that the ObjectId is well formatted. However, it does not check that the relationship type exists. There is an edge case, where we might save relationships with non existing types: 1, Open the UI. 2, Edit the relationships, select the type. Do not hit save. 3, Delete the relationship type from another browser (or even just window?). 4, Hit save on the relationships. The relationships are saved with the freshly deleted type.

Additionally, direct API calls can save any well formatted ObjectId.

The task is to add a check to the relationship saving. Note for prioritization: this is probably a low hanging fruit (small issue).

LaszloKecskes avatar Mar 27 '24 09:03 LaszloKecskes