Altinn / altinn-studio

Next generation open source Altinn platform and applications.
https://docs.altinn.studio
BSD 3-Clause "New" or "Revised" License
109 stars 73 forks source link

Adding the same type to a data model multiple times results in uncaught console error #12981

Open standeren opened 2 weeks ago

standeren commented 2 weeks ago

Description of the bug

If adding an element to the data model of a type the second time we get this error: Error: Node with pointer #/$defs/Innflytter/properties/ref0 already exists.

This is because we are not incrementing the name reference suffix

Steps To Reproduce

  1. Go to datamodell
  2. Create a type
  3. Drag the type into the model
  4. See it got the name ref0
  5. Drag the same type again and see that nothing happens but we get an uncaught error in the console

Additional Information

No response