monarc-project / MonarcAppFO

MONARC - Method for an Optimised aNAlysis of Risks by @NC3-LU
https://www.monarc.lu
GNU Affero General Public License v3.0
100 stars 38 forks source link

[FrontOffice, BackOffice] Fix possible circular iteration of the instance root -> parent -> child rendering #395

Closed ruslanbaidan closed 2 years ago

ruslanbaidan commented 2 years ago

[Description] The problem appears when an primary asset located in the root of an analysis When we click multiple times and move it a little bit (almost at the same position), the asset can be linked accidentally to itself. Means its root and parent asset will have the same id as asset instance id. E.g. instance with id = 1, can have parent_id = 1 and root_id = 1.

[Solution]

jfrocha commented 2 years ago

Fixed in Front https://github.com/monarc-project/ng-anr/commit/65db4a0ce8d3a04dde0fe3077811c2a0d7700345