goinnn/django-multiselectfield

Query: What should be the container type for MultiSelectField while creating object

Shubkush opened this issue · 0 comments

Hey I have one question which I am not able to find anywhere.

While creating an object what container type (list, tuple or set) should be pass as parameter for the MultiSelectField?
For example if chapters is a MultiSelectField in Book model then which one is correct?
Book.objects.create(chapters=["chapter 1", "chapter 2"]) Using list
or
Book.objects.create(chapters={"chapter 1", "chapter 2"}) Using Set