Is there a paid support option to get help? I've been trying to ask for 
help on IRC for a while but all I've gotten is insults.

On Monday, July 16, 2018 at 6:06:00 PM UTC-4, cbpa...@gmail.com wrote:
>
> I'm using Django 2.0.3 on Ubuntu 16.04. Any idea what would cause a model 
> formset to return None when calling save()? Here is the relevant code:
>
> RepairFormSet = modelformset_factory(Repair, form=RepairForm, exclude=[])
>
> form = RepairFormSet(request.POST)
>
> if form.is_valid():
>   form.save()
>   return render(request, 'message-loggedin', {
>     'title': 'Success',
>     'message': 'A repair request has been made successfully.'
>   })
> else:
>   return render(request, 'message-loggedin', {
>     'title': 'Error',
>     'message': format_html(str(form.errors))
>   })
>
>
> I checked the database and nothing is added to it, form.save() just always 
> returns None. When I try to debug within django/forms/models.py it seems that 
> form.has_changed() always returns False, causing nothing to be saved. However 
> I do not understand why it thinks nothing has been changed. Any help would be 
> greatly appreciated.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/00a3c7fa-820f-4f4c-8734-07d2c542d596%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to