def has_tag(self, p_key, p_value=""):
        """
        Returns true when there is at least one tag with the given key. If a
        value is passed, it will only return true when there exists a tag with
        the given key-value combination.
        """
        tags = self.fields['tags']
        return p_key in tags and (p_value == "" or p_value in tags[p_key])