﻿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
27148	Invalid input for UUIDField with ModelMultipleChoiceField throws ValueError, not ValidationError	Daniel Hahler	nobody	"I have added a test in https://github.com/django/django/pull/7180.

This test shows that an invalid value for a UUIDField will bubble up as
`ValueError`.  The problem here seems to be that `get_prep_value` just
passes through the (invalid) string.

Only when the queryset is evaluated just below via the following code,
the ValueError from `UUIDField.get_db_prep_value` is raised and bubbles
up:

{{{
self.queryset.filter(**{'%s__in' % key: value})
pks = set(force_text(getattr(o, key)) for o in qs)
}}}

Explicitly evaluating the queryset above already would fix it, but that
would get done for every selected value then.

Needs `UUIDField` to be fixed for this, e.g. raising the `ValueError`
from `get_prep_value` already?
In this case other fields would need the same fix probably (from what I
have seen while skimming the code)."	Bug	closed	Forms	1.10	Normal	fixed			Accepted	1	0	0	0	0	0
