Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: partial update not working as expected (?) #1416

Open
awesthouse opened this issue Mar 22, 2024 · 1 comment
Open

fix: partial update not working as expected (?) #1416

awesthouse opened this issue Mar 22, 2024 · 1 comment
Assignees

Comments

@awesthouse
Copy link
Contributor

awesthouse commented Mar 22, 2024

Branch
https://github.com/equinor/dm-core-packages/tree/fix/form-payload

Entrypoint
SIMPOS -> "Analyses"-> "Positioning" -> "Line Tensions" -> pick a run

Partial update doesn't keep old values

Expected behavior

When only updating and passing some primitives, it should update the passed new values and keep old values for primitives not in payload.

Test form - Scenario form with fields label and description
Skjermbilde 2024-03-22 kl  12 26 32

Blueprint
https://github.com/equinor/dm-app-simpos/blob/main/application/app/data/SIMPOSDS/mtsmo/analysis/positioning/srs/Scenario.json

Example Payload

{ "type": "dmss://SIMPOSDS/mtsmo/analysis/positioning/srs/Task", "label": "Offset ULS UPDATED" }

What happens

It updates label value, but removes other primitive values from object, like description. Seems to keep complex objects.

Throws error on missing required primitive in complex object

Think this is actually related to the issue above where it doesn't keep the unchanged primitive values. If you try updating one field in Wave form, it will throw an error saying that the other unsent fields are required and missing, and if you edit all fields in Wave form, it throws an error saying "Missing required attribute 'seed'" which is a required attribute in Wave, but not shown in the UI. If you try submitting a form with all optional values (like Analyses -> Stability) it saves without error, but doesn't keep unchanged/previous values.

@soofstad soofstad self-assigned this May 7, 2024
@soofstad
Copy link
Collaborator

soofstad commented May 7, 2024

@awesthouse not able to recreate this. Everything seems to work okey on the tests I've been doing.
Can you show the whole request going to DMSS?
Or, we can have a sit down together on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants