Altinn / altinn-studio

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

Preview crashes when there is no data model #13170

Open mlqn opened 3 months ago

mlqn commented 3 months ago

Description of the bug

Preview crashes when there is no data model.

Steps To Reproduce

https://github.com/user-attachments/assets/4e470761-7cd7-45df-a144-74a9479430a4

Additional Information

No response

wrt95 commented 1 month ago

Investigate if we need a data model for an app. If there is a need for a data model, keep it as it is. If not, mock to make it work.

nkylstad commented 1 month ago

This does not seem like a critical issue when I think about it. The current preview will not be able to show form components without a datamodel anyways, it will show an error message in place of the component. Additionally, the app template ships with a data model as standard. So it is only if the user deletes the data model and does not add a new one that this is even an issue. Perhaps what we could do is check for this explicitly in the preview-app: