@classmethod
    def answered_call_exists(cls, contact_doc_type, contact_id, from_timestamp, to_timestamp=None):
        qs = cls.by_recipient(
            contact_doc_type,
            contact_id
        ).filter(
            direction=OUTGOING,
            date__gte=from_timestamp,
            answered=True
        )

        if to_timestamp:
            qs = qs.filter(
                date__lte=to_timestamp
            )

        return 0 > qs.count()
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/ivr/models.py/Call.answered_call_exists/swapped operands of `>`