title: MultiValueDictKeyError while updating inline formsets
body: <p>I'm having an issue with Django while updating inline formsets. I want to update a form and an inline formset, but it raises this error: </p>
  
  <pre><code>"MultiValueDictKeyError"
  
  Exception Value: "u'clientphone_set-0-id'"
  </code></pre>
  
  <p>This is my view:</p>
  
  <pre><code>def edit_client(request, client_id):
  
      client_to_edit = Client.objects.get(id=client_id)
      form = ClientForm(instance=client_to_edit)
      phone_formset = ClientPhoneFormSet(instance=client_to_edit)
  
      if request.method == 'POST':
          form = ClientForm(request.POST, instance=client_to_edit)
  
          if form.is_valid():
              form_saved = form.save(commit=False)
              phone_formset = ClientPhoneFormSet(request.POST, request.FILES, instance=form_saved)
  
              if phone_formset.is_valid():
                  form_saved.save()
                  phone_formset.save()        
                  return client(request)
  
      return render(request, 'WorkOrders/add_client.html', {'form' : form, 'phone_formset' : phone_formset})
  </code></pre>
  
  <p>And these are my forms</p>
  
  <pre><code>class ClientForm(forms.ModelForm):
      name = forms.CharField(max_length=128)
      rif = forms.CharField(max_length=10)
      address = forms.CharField(max_length=250)
  
      class Meta:
          model = Client
          fields = ('name','rif','address',)
  
  ClientPhoneFormSet = inlineformset_factory(Client, ClientPhone, extra=1, fields=('phone_number',), can_delete=True)
  </code></pre>
  
  <p>And this is my template</p>
  
  <pre><code>&lt;form class="form-horizontal" id="add_client" method="post" action="."&gt;
      {% csrf_token %}
      {% for field in form.visible_fields %}
          &lt;div class="form-group"&gt;
             &lt;label for="{{ field.id }}" class="col-sm-2 control-label"&gt;{{ field.help_text }}&lt;/label&gt;
             &lt;div class="col-sm-10"&gt;
               {{ field.errors }}
               {{ field }}
             &lt;/div&gt;
          &lt;/div&gt;
      {% endfor %}
      &lt;div class="form-group"&gt;
          &lt;label for="{{ field.id }}" class="col-sm-2 control-label"&gt;Teléfono&lt;/label&gt;
          &lt;div class="col-sm-10"&gt;
              &lt;table border="0" cellpadding="0" cellspacing="0" width="100%"&gt;
                  &lt;tbody&gt;
                      {% for form in phone_formset.forms %}
                          &lt;tr&gt;
                              &lt;td&gt;
                                  {% if form.instance.pk %}
                                      {{ form.DELETE }}
                                  {% endif %}
                                  {{ form.errors }}
                                  {{ form.phone_number }}
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      {% endfor %}
                  &lt;/tbody&gt;
              &lt;/table&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  {{ phone_formset.management_form }}
      &lt;div class="form-group"&gt;
          &lt;div class="col-sm-offset-2 col-sm-10"&gt;
              &lt;button type="submit" class="btn btn-primary"&gt;Guardar&lt;/button&gt;
              &lt;a href="{% url 'index' %}" class="btn btn-primary"&gt;Volver&lt;/a&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/form&gt; 
  </code></pre>
  
  <p>It opens the form with no problem, the error happens when I submit.</p>
  
  <p>Thanks.</p>