'Fail early if using the activity class in the wrong way'

def __getattr__(self, name):

    if (name in ['object', 'target', 'actor']):
        if (name not in self.__dict__):
            error_message = ('Field    self.%s    is    not    defined,    use    self.%s_id    instead' % (name, name))
            raise AttributeError(error_message)
    return object.__getattribute__(self, name)
