def get_comments(self):
        comments = FileAttachmentComment.objects.filter(
            file_attachment_id=self.obj.pk)

        if self.diff_against_obj:
            comments = comments.filter(
                diff_against_file_attachment_id=self.diff_against_obj.pk)
        else:
            comments = comments.filter(
                diff_against_file_attachment_id__isnull=True)

        return comments
Returns a list of comments made on the FileAttachment.
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/reviews/ui/base.py/FileAttachmentReviewUI.get_comments