Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
oanatmaria committed Jan 12, 2024
1 parent 22b840c commit 7d64ec2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions packages/flask-aserto/src/flask_aserto/aio/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,9 @@ async def mapper() -> str:
policy_path = await self._options.policyPathMapper()
if policy_path == "":
policy_path = "check"
if self._options.policyRoot:
policy_path = self._options.policyRoot + "." + policy_path
elif self._aserto_middleware._policy_path_root != "":
policy_path = self._aserto_middleware._policy_path_root + "." + policy_path
policy_root = self._options.policyRoot or self._aserto_middleware._policy_path_root
if policy_root:
policy_path = f"{policy_root}.{policy_path}"
return policy_path

return mapper
Expand Down
7 changes: 3 additions & 4 deletions packages/flask-aserto/src/flask_aserto/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,9 @@ def mapper() -> str:
policy_path = self._options.policyPathMapper()
if policy_path == "":
policy_path = "check"
if self._options.policyRoot:
policy_path = self._options.policyRoot + "." + policy_path
elif self._aserto_middleware._policy_path_root != "":
policy_path = self._aserto_middleware._policy_path_root + "." + policy_path
policy_root = self._options.policyRoot or self._aserto_middleware._policy_path_root
if policy_root:
policy_path = f"{policy_root}.{policy_path}"
return policy_path

return mapper
Expand Down

0 comments on commit 7d64ec2

Please sign in to comment.