'Memberships are immutable, with the exception of last activity
date.'

def __setattr__(self, name, value):

    if (name in self.immutable_fields):
        current_value = getattr(self, name, None)
        if (value == current_value):
            return
        elif (current_value is not None):
            raise ImmutableMembershipFieldException(("Field    %r    shouldn't    change    from    %r    to    %r" % (name, current_value, value)))
    super(CourseTeamMembership, self).__setattr__(name, value)
