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

Setter functions of buildingobjects in ThermalZone not working #721

Open
l-kotzur opened this issue Sep 16, 2022 · 0 comments
Open

Setter functions of buildingobjects in ThermalZone not working #721

l-kotzur opened this issue Sep 16, 2022 · 0 comments

Comments

@l-kotzur
Copy link

l-kotzur commented Sep 16, 2022

What is the problem?

  • I cannot modify the outer_walls list in ThermalZone.outer_walls by its public @outer_walls.setter attribute in thermalzone.py line 496.
    @outer_walls.setter
    def outer_walls(self, value):
        if value is None:
            self._outer_walls = []

Why do we want to solve it?

  • It is not clear if it is intentional that the lists cannot be changed. In case it should be changeable, the functions require corrections. If not, the setter function should be private or raise an error.

How do we want to solve it?

  • Correct the setter functions in thermalzone.py between line 496 and 564 by adding
    if value is None:
        self._outer_walls = []
    else:
        self._outer_walls = value

or

    if value is None:
        self._outer_walls = []
    else:
        raise ValueError("'outer_walls' is immutable")
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

1 participant