#24319: UUIDField do not properly clean (validate) value in get_db_prep_value
-------------------------------------+-------------------------------------
     Reporter:  davidfischer-ch      |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.8alpha1
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:  clean,uuid           |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by jarshwah):

 I agree with Tim that get_x_prep is not required to do validation on
 values coming in. The methods are responsible for converting data to a
 format that the database accepts. This happens to naturally validate some
 model fields during the conversion - but this is a side effect.

 However, when it is easy enough to provide validation we should. The error
 messages are usually clearer to read, and we prevent an entire class of
 wrong data ever getting to the database. Fail fast etc.

 I've knocked out a quick patch to fix this as I think the change is nice
 and localised. See https://github.com/django/django/pull/4114

--
Ticket URL: <https://code.djangoproject.com/ticket/24319#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/073.fed38b3168ff9e62f1f62dfde541ce96%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to