Skip to content

Commit

Permalink
Changed the code as per code review
Browse files Browse the repository at this point in the history
  • Loading branch information
kapil-metron committed Dec 12, 2024
1 parent ded681d commit 3f5d90b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Packs/Doppel/Integrations/Doppel/Doppel.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ def get_alert(self, id: str, entity: str) -> Dict[str, str]:
:return: dict as with alert's details
:rtype: ``dict``
"""
api_name: str = "alert"
api_url = f"{self._base_url}/{api_name}?"
params: dict = {}
if id:
api_url = f"{api_url}id={id}"
params['id'] = id
if entity:
api_url = f"{api_url}entity={entity}"
params['entity'] = entity

response_content = self._http_request(
method="GET",
full_url=api_url
url_suffix='alert',
params=params
)
return response_content

Expand Down
2 changes: 1 addition & 1 deletion Packs/Doppel/Integrations/Doppel/Doppel_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ def test_command_exception(mocker, requests_mock, command, args, api_path, statu
# Notice that the API was not called, but the app itself has raised an exception before making the API call
assert adapter.call_count == 0
assert results_checker.call_args.args[0].get('Contents') == exception_message


0 comments on commit 3f5d90b

Please sign in to comment.