jrief / django-angular

Let AngularJS play well with Django
http://django-angular.awesto.com/
MIT License
1.23k stars 294 forks source link

CheckboxInputs with initial values ignore initial values. #295

Closed craftycorvid closed 7 years ago

craftycorvid commented 7 years ago

I've been putting the 1.11 test version through its paces and noticed this issue. A model form with a checkbox input will not respect the model field's initial value.

I tracked down the problem to line 135 in djng/forms/angular_base.py: context = super(self.__class__, self).get_context(name, value, attrs)

Is there a good reason to call super there? It's skipping the CheckboxInput get_context method and only running the Input get_context method.

jrief commented 7 years ago

I'll check this.

craftycorvid commented 7 years ago

I had 100% reproduction on this when I submitted the ticket, but now it seems to be working. False alarm?