Skip to content

Commit

Permalink
Fix rules update
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusWirtz committed Apr 7, 2022
1 parent e2e9a02 commit c90b1ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions TM1py/Objects/Cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ def rules(self) -> Rules:

@rules.setter
def rules(self, value: Union[str, Rules]):
if isinstance(value, str):
if value is None:
self._rules = None
elif isinstance(value, str):
self._rules = Rules(rules=value)
elif isinstance(value, Rules):
self._rules = value
else:
raise ValueError('value must be of type str or Rules')
raise ValueError('value must None or of type str or Rules')

@property
def skipcheck(self) -> bool:
Expand Down

0 comments on commit c90b1ba

Please sign in to comment.