django-multiselectfield icon indicating copy to clipboard operation
django-multiselectfield copied to clipboard

If single choice response is string else it's array

Open shaheem-pp opened this issue 2 years ago • 2 comments

I created a models field with multiselectfield

When I used the data in rest response, if theere is only one selected field the data is passed as string, else it is an array

how to solve this issue?

shaheem-pp avatar Dec 07 '22 07:12 shaheem-pp

Attaching screenshots

when only one selected field Screenshot 2022-12-07 at 1 30 06 PM

when multiple fields are selected Screenshot 2022-12-07 at 1 30 24 PM

shaheem-pp avatar Dec 07 '22 08:12 shaheem-pp

Can you open a pull request that adds a test for this? It's fine if the GitHub Action tests fail, just having a failing test will help.

blag avatar May 24 '24 19:05 blag