<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cancel(self):
 """Cancel an EighthScheduledActivity. This does nothing besides set the cancelled flag and save the object. """

        # super(EighthScheduledActivity, self).save(*args, **kwargs)

        logger.debug("Running cancel hooks: {}".format(self))

        if not self.cancelled:
            logger.debug("Cancelling {}".format(self))
            self.cancelled = True
        self.save()
        # NOT USED. Was broken anyway.
        """
        cancelled_room = EighthRoom.objects.get_or_create(name="CANCELLED", capacity=0)[0]
        cancelled_sponsor = EighthSponsor.objects.get_or_create(first_name="", last_name="CANCELLED")[0]
        if cancelled_room not in list(self.rooms.all()):
            self.rooms.all().delete()
            self.rooms.add(cancelled_room)

        if cancelled_sponsor not in list(self.sponsors.all()):
            self.sponsors.all().delete()
            self.sponsors.add(cancelled_sponsor)

        self.save()
        """