goinnn / django-multiselectfield

A Multiple Choice model field
GNU Lesser General Public License v3.0
450 stars 208 forks source link

If single choice response is string else it's array #137

Open shaheem-pp opened 1 year ago

shaheem-pp commented 1 year ago

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 commented 1 year ago

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
blag commented 5 months ago

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.