human
Solve the following python programming problem given the following code:
def _add_moderated_object_to_class(self, model_class) : 
    if hasattr (get_moderated_object, '_relation_object') : 
        relation_object = getattr (model_class, '_relation_object') 
else : 
        relation_object = GenericRelation (ModeratedObject, object_id_field = 'object_pk') 
model_class.add_to_class ('_relation_object', relation_object) 
    def get_moderated_object(self) : 
        if (not hasattr (self, '_moderated_object')) : 
            if (self._relation_object.count () > 0) : 
                self._moderated_object = getattr (self, '_relation_object').filter ().order_by ('-date_updated') [0] 
else : 
                self._moderated_object = getattr (self, '_relation_object').get () 
return self._moderated_object 
model_class.add_to_class ('moderated_object', property (get_moderated_object)) 

    
    

    Fix the buggy line: if hasattr (get_moderated_object, '_relation_object') :
assistant
#Here is Python code to fix the buggy line: if hasattr (get_moderated_object, '_relation_object') :
.

if hasattr (model_class, '_relation_object') :