def add_comment(self, case_obj, text, variant_id=None, username=None):
        """Add a comment to a variant or a case"""

        comment = Comment(
            text=text,
            username=username or 'Anonymous',
            case=case_obj,
            # md5 sum of chrom, pos, ref, alt
            variant_id=variant_id
        )
        self.session.add(comment)
        self.save()
        return comment