The problem appears when you have a form (not bound) with choiceField (foreignkeys and m2m) and at some point, you initialize it with angular. What happens when you get a json serialized representation of your model is, if you have foreignkey, you get the pk as a number. BUT, a select expects the value to be a string (!). Angular then adds a new option value to the select which make no sens.
In the angular docs, an example is shown with a convertToNumber directive. https://docs.angularjs.org/api/ng/directive/select (last example on the page)
I only reuse the formatters part as we need to ensure it stays generic.
The problem appears when you have a form (not bound) with choiceField (foreignkeys and m2m) and at some point, you initialize it with angular. What happens when you get a json serialized representation of your model is, if you have foreignkey, you get the pk as a number. BUT, a select expects the value to be a string (!). Angular then adds a new option value to the select which make no sens.
In the angular docs, an example is shown with a convertToNumber directive. https://docs.angularjs.org/api/ng/directive/select (last example on the page) I only reuse the formatters part as we need to ensure it stays generic.
Cheers