#19299: Foreign keys using to_field and having legitimate empty string values 
fail
with NULL errors
-------------------------------------+-------------------------------------
     Reporter:  evan@…               |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.4
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by tunixman):

 I think if Oracle treats them the same way, it will regardless of which we
 return, so maybe we can just return the correct value regardless. The
 databases that make the distinction will, and the ones that don't won't,
 but we'll have the right value coming out of this function regardless. It
 may also be something we don't actually want to check in other places
 either for the same reasons: Oracle collapses both values to NULL, other
 databases make a distinction.

 I'm happy to look for other places this check might happen though, and if
 adding a check to connection.features.interprets_empty_strings_as_nulls is
 actually necessary add that as well.

 Thanks!

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19299#comment:2>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to