'Override `save` to optionally mask out the query from being saved to the
database. This is because if the beeswax database contains sensitive
information like personally identifiable information, that information
could be leaked into the Hue database and logfiles.'

def save(self, *args, **kwargs):

    if global_redaction_engine.is_enabled():
        redacted_query = global_redaction_engine.redact(self.query)
        if (self.query != redacted_query):
            self.query = redacted_query
            self.is_redacted = True
    super(QueryHistory, self).save(*args, **kwargs)
