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

Objects API v2 registration crashes with fieldsets #4141

Closed
Viicos opened this issue Apr 9, 2024 · 1 comment · Fixed by #4180
Closed

Objects API v2 registration crashes with fieldsets #4141

Viicos opened this issue Apr 9, 2024 · 1 comment · Fixed by #4180
Assignees
Labels
bug Something isn't working needs-backport Fix must be backported to stable release branch owner: utrecht
Milestone

Comments

@Viicos
Copy link
Contributor

Viicos commented Apr 9, 2024

Product versie / Product version

2.6.2

Omschrijf het probleem / Describe the bug

With the following configuration:

submission = SubmissionFactory.from_components(
    [
        {
            "key": "fieldset",
            "type": "fieldset",
            "components": [
                {
                    "key": "fieldset.textfield",
                    "type": "textfield"
                }
            ]
        },
    ],
    completed=True,
    submitted_data={
        "fieldset": {
            "textfield": "some_string",
        },
    },
)

The objects API v2 registration crashes:

openforms/submissions/models/submission_value_variable.py line 57, in get_variable
    return self.variables[key]
KeyError: 'fieldset'

Due to how the submission values variable state is being used

Stappen om te reproduceren / Steps to reproduce

No response

Verwacht gedrag / Expected behavior

No response

Screen resolution

None

Device

None

OS

None

Browser

No response

@Viicos Viicos added bug Something isn't working triage Issue needs to be validated. Remove this label if the issue considered valid. labels Apr 9, 2024
@sergei-maertens sergei-maertens added the needs-backport Fix must be backported to stable release branch label Apr 9, 2024
@joeribekker
Copy link
Contributor

Refinement: Some discussion about whether this is caused by the modern data format function or that its caused by some part of the code that still uses the old mechanism.

@joeribekker joeribekker added owner: utrecht and removed triage Issue needs to be validated. Remove this label if the issue considered valid. labels Apr 15, 2024
Viicos added a commit that referenced this issue Apr 16, 2024
Viicos added a commit that referenced this issue Apr 16, 2024
sergei-maertens added a commit that referenced this issue Apr 16, 2024
…-reg

 [#4141] Fix Objects API registration crash with fieldset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-backport Fix must be backported to stable release branch owner: utrecht
Projects
Archived in project
3 participants