OpenSlides / openslides-client

Webclient for OpenSlides 4+
MIT License
3 stars 33 forks source link

Bulk action user.update add to meeting is throwing an Error #4085

Open Elblinator opened 4 months ago

Elblinator commented 4 months ago

Current behaviour: If you try to add a participant via bulk action/multi action then the following Error is thrown:

Error: data.group_ids[1] must be integer

Payload:

[  {
    "action": "user.update",
    "data": [      {
        "id": 5097,
        "meeting_id": 101,
        "group_ids": [
          631,
          null  
        ]     
     }]
}]

Response:

{
    "success": false,
    "message": "data.group_ids[1] must be integer",
    "action_error_index": 0,
    "action_data_error_index": 0
}

Wanted behaviour: It should be possible to add user via bulk action/multi select to one or more meetings, if no group was specified then the default group should be used

luisa-beerboom commented 2 months ago

The error is being thrown, because there is a null value in the group_ids list, when really, that list should only contain integers. The client should not be sending that payload. As for the default group regulation, that has, so far, always been done by the client. Implementing it in the backend would not only require conceptualization, it would also very much be a feature issue, not a bug issue.

Regardless, I am assuming that fixing this in the client should suffice, so I am transferring this issue.

reiterl commented 1 month ago

I need a steps description, @Elblinator said:

  1. Go to account-list
  2. activate multiselect
  3. Add some accounts
  4. set/remove meetings
  5. add a meeting.
  6. Send the stuff.

As far as @Elblinator said, it just happens sometimes.

reiterl commented 1 month ago

I could never reproduce this problem. My pr makes it worse. I am not assigned anymore.

reiterl commented 1 month ago

I tried to reproduce this problem once more, but failed.