Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in TableauParameters.get_parameter_by_name #112

Open
thklopp opened this issue Oct 5, 2021 · 2 comments
Open

Typo in TableauParameters.get_parameter_by_name #112

thklopp opened this issue Oct 5, 2021 · 2 comments

Comments

@thklopp
Copy link

thklopp commented Oct 5, 2021

I think there is a typo in file tableau_tools/tableau_documents/tableau_parameters.py

class TableauParameters(LoggingMethods):
    ...
    def get_parameter_by_name(self, parameter_name: str) -> TableauParameter:
        for p in self._parameters:
            if self.parameters[p].name == parameter_name:
                return p
        else:
            raise NoMatchFoundException('No parameter named {}'.format(parameter_name))
    ...

self.parameters[p].name should be self._parameters[p].name

Regards

@martijn1247812
Copy link

martijn1247812 commented Dec 10, 2021

also it doesn't return the parameter object only the name (string)

so this should be:
return self._parameters[p]

@israeldi
Copy link

I see that this is still an issue. Will this issue ever get fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants