          return value
  
      def get_prep_value(self, value):
          if value and ':' in value:
              try:
                  return clean_ipv6_address(value, self.unpack_ipv4)
              except ValidationError:
                  pass
 
</s> remove         if not value:
            return ''
 </s> add         if value in validators.EMPTY_VALUES:
            return u'' </s> remove     generic_ip = models.GenericIPAddressField(blank=True, unique=True)
    v4_ip = models.GenericIPAddressField(blank=True, protocol="ipv4")
    v6_ip = models.GenericIPAddressField(blank=True, protocol="ipv6")
 </s> add     generic_ip = models.GenericIPAddressField(blank=True, null=True, unique=True)
    v4_ip = models.GenericIPAddressField(blank=True, null=True, protocol="ipv4")
    v6_ip = models.GenericIPAddressField(blank=True, null=True, protocol="ipv6")
    def get_db_prep_value(self, value, connection, prepared=False):
        if not prepared:
            value = self.get_prep_value(value)
        return value or None

          return value
  
    def get_db_prep_value(self, value, connection, prepared=False):
        if not prepared:
            value = self.get_prep_value(value)
        return value or None

      def get_prep_value(self, value):
          if value and ':' in value:
              try:
                  return clean_ipv6_address(value, self.unpack_ipv4)
              except ValidationError:
                  pass
keep add keep keep keep keep keep keep
 Fixed #16246 -- Fixed GenericIPAddressField tests on PostgreSQL.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16395 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/db/models/fields/__init__.py