diff --git a/fastapi_router_controller/lib/controller.py b/fastapi_router_controller/lib/controller.py index 1c80283..8daa24c 100644 --- a/fastapi_router_controller/lib/controller.py +++ b/fastapi_router_controller/lib/controller.py @@ -89,8 +89,9 @@ def add_resource(self, cls): raise MultipleResourceException() # check if cls (Resource) was exteded from another - if hasattr(cls, Controller.RC_KEY): - self.__get_parent_routes(cls.__router__) + for base in cls.__bases__: + if hasattr(base, Controller.RC_KEY): + self.__get_parent_routes(base.__router__) setattr(cls, Controller.RC_KEY, self.router) setattr(self, Controller.RESOURCE_CLASS_KEY, cls)