def get_prep_value(self, value):
        """Before encryption, need to prepare values."""
        value = super(NullBooleanPGPPublicKeyField, self).get_prep_value(value)
        if value is None:
            return None
        return "%s" % bool(value)
Before encryption, need to prepare values.