#24078: GenericIPAddressField is inconsistent with nulls
----------------------------------------------+--------------------
     Reporter:  jarshwah                      |      Owner:  nobody
         Type:  Bug                           |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  master
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 IP Addresses are stored as inet on postgres, so the empty string isn't
 allowed. Instead, any empty strings are converted to nulls.

 Oracle will then convert that null to the empty string once it's
 retrieved, because GenericIPAddressField.empty_strings_allowed = True.
 Other backends will return None.

 I think the right thing to do is set empty_strings_allowed = False on
 GenericIPAddressField, but I'm not sure if that'll have other
 implications. I'll put together a patch later today.

--
Ticket URL: <https://code.djangoproject.com/ticket/24078>
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/051.2d5b60fb353c9da076abcce183945fec%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to