You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a list of choices in my database
MONTH_CHOICES = (
('1', _('January')),
('2', _('February')),
('10', _('October')),
('11', _('November')),
('12', _('December')),
)
Two objects contains month_list = ['1', '12'] and ['2']
I want to filter objects contains february month. but when I apply filter conatains filter with value '2' it is returing objects contains value '2' or '12' becuase it is searching in string
how can I apply list filter in this.
The text was updated successfully, but these errors were encountered:
This is a limitation of how d-msf serializes data to the database, and there isn't a scalable way we can fix this with that. I recommend using an array field like django.contrib.postgres.fields.ArrayField if you can.
I have a list of choices in my database
MONTH_CHOICES = (
('1', _('January')),
('2', _('February')),
('10', _('October')),
('11', _('November')),
('12', _('December')),
)
Two objects contains month_list = ['1', '12'] and ['2']
I want to filter objects contains february month. but when I apply filter conatains filter with value '2' it is returing objects contains value '2' or '12' becuase it is searching in string
how can I apply list filter in this.
The text was updated successfully, but these errors were encountered: