Expect to be allowed to re-use one options file multiple times
Screenshots
If applicable, add screenshots or animated gif to help explain your problem.
Stack trace:
fail: Altinn.App.Api.Controllers.ProcessController[0]
Process next failed.: System.ArgumentException: An item with the same key has already been added. Key: JaNei
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at Altinn.App.Services.Implementation.AppBase.GetOptionsDictionary(String formLayout)
at Altinn.App.Services.Implementation.AppBase.GenerateAndStoreReceiptPDF(Instance instance, String taskId, DataElement dataElement, Type dataElementModelType)
at Altinn.App.Services.Implementation.AppBase.OnEndProcessTask(String taskId, Instance instance)
at Altinn.App.Api.Controllers.ProcessController.NotifyAppAboutEvents(IAltinnApp altinnApp, Instance instance, List`1 events)
at Altinn.App.Api.Controllers.ProcessController.UpdateProcessAndDispatchEvents(Instance instance, ProcessStateChange processStateChange)
at Altinn.App.Api.Controllers.ProcessController.NextElement(String org, String app, Int32 instanceOwnerPartyId, Guid instanceGuid, String elementId)
Add any other relevant context info about the problem here.
For example OS (Windows, MacOS, iOS), browser (Chrome, Firefox, Safari), device (iPhone, laptop), screen-size, etc.
Describe the bug
If you use the same option file multiple times, you get an exception after posting the form.
To Reproduce
Steps to reproduce the behavior:
or use this unit test:
https://github.com/torbjokv/altinn-studio/blob/bug/options-duplicate-key/src/Altinn.Apps/AppTemplates/AspNet/Altinn.App.PlatformServices.Tests/Implementation/AppBaseTests.cs
Expected behavior
Expect to be allowed to re-use one options file multiple times
Screenshots
Stack trace:
JaNei.json:
layout:
Additional info