diff --git a/ansible_base/lib/routers/association_resource_router.py b/ansible_base/lib/routers/association_resource_router.py index 6e4733162..1e4b0d890 100644 --- a/ansible_base/lib/routers/association_resource_router.py +++ b/ansible_base/lib/routers/association_resource_router.py @@ -215,8 +215,9 @@ def register(self, prefix, viewset, related_views={}, basename=None): associated_viewset = self.associated_viewset_cls_factory(related_view) # Generate the related viewset + # Name includes and parent and child viewset, because this defines global uniqueness modified_related_viewset = type( - f'Related{related_view.__name__}', + f'Related{viewset.__name__}{related_view.__name__}', (mixin_class, associated_viewset), { 'association_fk': fk,