From 9cecb896e88164096b5207bb8de2bd88e65794ed Mon Sep 17 00:00:00 2001 From: Adam Gardner <26523841+agardnerIT@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:33:10 +1000 Subject: [PATCH] fix: get_path_for implementation Signed-off-by: Adam Gardner <26523841+agardnerIT@users.noreply.github.com> Signed-off-by: Federico Bond --- .../contrib/providers/flagd/web_api_url_factory.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/openfeature/contrib/providers/flagd/web_api_url_factory.py b/openfeature/contrib/providers/flagd/web_api_url_factory.py index 8690e056..9f808e68 100644 --- a/openfeature/contrib/providers/flagd/web_api_url_factory.py +++ b/openfeature/contrib/providers/flagd/web_api_url_factory.py @@ -37,11 +37,10 @@ def get_object_path(self): return self._format_url(self.OBJECT) def get_path_for(self, flag_type: FlagType): - return self[ - WebApiUrlFactory.__mapping.get( - flag_type, WebApiUrlFactory.__default_mapping_key - ) - ]() + method_name = self.__mapping.get( + flag_type, WebApiUrlFactory.__default_mapping_key + ) + return getattr(self, method_name)() def _format_url(self, path: str): return f"{self.root}/{path}"