Skip to content

Participant user create structure_level_ids error #6444

Description

@Janmtbehrens

Describe the bug

Creating a new user in the participants menu under specific conditions causes backend to throw the following error:
ERROR:openslides_backend.shared.handlers.base_handler:Error occured on index 0: Action user.create: data.structure_level_ids must be array

Inspecting the Action Data reveals that that the field structure_levels_ids is set to None, which is not a valid value

How to Reproduce

  1. Go to Participants of a Meeting
  2. Create a new User
  3. Set the email and username to "test@test.com" (both of them)
  4. Click Next
  5. Click Save
  6. Error occurs

This error does not occur, when the email is left empty in the first menu and then set in the second menu.

Expected behavior

The field structure_levels_ids is set to [] when no structure level IDs are present or left out entirely, so that user creation can work without error.

Additional context

This bug does not occur in the demo, but does occur in latest main.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions