title: inserting a data in a formset passed by a form
body: <p>hi I have this error in inserting a data in a formset passed by a form this is the error that appears in my browser:</p>
  <blockquote>
  <p>NOT NULL constraint failed: devtest_datigruppi.gruppi_scheda_id</p>
  </blockquote>
  <p>it practically fails to see this change: groups.gruppi_scheda = Schede.objects.get (tab_name = tabName) but via print the right thing appears to me</p>
  <pre><code>schedaName = schede_form.cleaned_data['nome_scheda']
  scheda = schede_form.save(commit = False)
  scheda.utente = request.user
  scheda.save()
  
   #gruppi
   if gruppi_formset.is_valid():
    for gruppi in gruppi_formset:
     gruppi.save(commit = False)
     gruppi.gruppi_scheda = Schede.objects.get(nome_scheda = schedaName)
     //print(gruppi.gruppi_scheda)
     gruppi.save()
  </code></pre>