Skip to content

Commit

Permalink
Refactor: Simplify parameter validation
Browse files Browse the repository at this point in the history
  • Loading branch information
onefloid authored and MariusWirtz committed Nov 12, 2024
1 parent 20bfffd commit 896dd41
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions TM1py/Services/CubeService.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,7 @@ def update_or_create_rules(self, cube_name: str, rules: Union[str, Rules], **kwa
"""
if isinstance(rules, str):
rules = Rules(rules=rules)
if isinstance(rules, Rules):
pass
else:
if not isinstance(rules, Rules):
raise ValueError('rules must be type str or Rules')

url = format_url("/Cubes('{}')", cube_name)
Expand Down

0 comments on commit 896dd41

Please sign in to comment.