fix: allow services to be added to Base
@@ -81,7 +81,7 @@ class Base:
:return: Whether the service exists or not.
:rtype: bool
"""
- return bool(self.__objects.get(name))
+ return name in self.__objects
def add_service(self, obj: object, name: str) -> Dict[str, object]:
"""
@@ -98,9 +98,8 @@ class Base:
"""
model: Dict[str, object] = {name: obj}
- if self._check_service(model):
self.__objects.update(model)
- return self.__objects.get(name)
+ return model
def remove_service(self, name: str) -> Union[Exception, bool]:
"""
