﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28619	Handle ValidationError in model saving in admin change views	Daniel Hahler	heba1108	"Currently ValidationErrors raised in `save_model` and `save_related` are not handled: the form is considered to be valid, and the error wil typically bubble up, causing a 500.

A patch/PR is available at: https://github.com/django/django/pull/9113 - currently no tests are failing because of it.


Some background:

`save_model` typically calls the model's `save` method, but with apps like django-fsm this might be a custom transition etc, and it is easier to ensure some state in there (e.g. that a certain field is non-empty when transitioning the state), especially when the admin is not the main interface to those transitions.

As for django-fsm-admin (admin integration for django-fsm), it is possible to hook into the form's `is_valid`, but it would still require an extra method/callback on the model then: https://github.com/gadventures/django-fsm-admin/pull/74."	New feature	closed	contrib.admin	1.11	Normal	wontfix			Unreviewed	1	0	0	0	0	0
