def mark_accepted(self, count=1):
        """
        Mark invitations accepted.

        Raises ``InvitationError`` if more invitations than possible is
        being accepted.

        **Optional arguments:**

        :count:
            Optional. Number of invitations to mark accepted. Default is ``1``.
        """
        if self.accepted + count > self.sent:
            raise InvitationError('There can\'t be more accepted ' \
                                  'invitations than sent invitations.')
        self.accepted = models.F('accepted') + count
        self.save()
dataset/ETHPy150Open muhuk/django-inviting/invitation/models.py/InvitationStats.mark_accepted/original