jazzband / django-smart-selects

chained and grouped selects for django forms
https://django-smart-selects.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.1k stars 348 forks source link

Reverting excessive lint correction that breaks init_value check #306

Closed prodigel closed 3 years ago

prodigel commented 3 years ago

When comparing init_value with fetched data the var type may have changed due to html.val() assignment (always string), so it will never match the previously selected option. Using only == will fix this issue.

Didn't check yet if the same issues applies to the many-to-many script.

manelclos commented 3 years ago

@prodigel thanks!