      for relation in opts.get_all_related_many_to_many_objects():
          accessor_name = relation.get_accessor_name()
          reverse_relations[accessor_name] = RelationInfo(
              model_field=None,
              related=relation.model,
              to_many=True,
              has_through_model=(
                  (getattr(relation.field.rel, 'through', None) is not None)
                  and not relation.field.rel.through._meta.auto_created
              )
 
</s> remove             related=relation.model,
 </s> add             related=related,
            related=related,
      for relation in opts.get_all_related_many_to_many_objects():
          accessor_name = relation.get_accessor_name()
          reverse_relations[accessor_name] = RelationInfo(
              model_field=None,
            related=related,
              to_many=True,
              has_through_model=(
                  (getattr(relation.field.rel, 'through', None) is not None)
                  and not relation.field.rel.through._meta.auto_created
              )
keep keep keep keep replace keep keep keep keep keep
 Work around meta API differences 
rest_framework/utils/model_meta.py