Skip to content

Commit

Permalink
names adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
mctonderski-splunk committed Jun 14, 2024
1 parent 151cf36 commit 5222328
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jira_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,11 @@ def _list_projects(self, param):

return action_result.set_status(phantom.APP_SUCCESS)

def _get_base_url(self, url):
def _get_base_url_from_url_path(self, url):
parsed_url = urlparse(url)
return f"{parsed_url.scheme}://{parsed_url.netloc}"

def _update_base_url(self, url, new_base):
def _update_base_url_in_url_path(self, url, new_base):
parsed_url = urlparse(url)
new_parsed_base = urlparse(new_base)
updated_url = urlunparse((
Expand All @@ -512,9 +512,9 @@ def _validate_and_update_custom_fields_url(self, custom_fields):
for value in allowed_values:
if 'self' in value:
self_url = value['self']
base_url = self._get_base_url(self_url)
base_url = self._get_base_url_from_url_path(self_url)
if base_url != self._base_url:
value['self'] = self._update_base_url(self_url, self._base_url)
value['self'] = self._update_base_url_in_url_path(self_url, self._base_url)
return custom_fields, None
except KeyError as e:
return False, f"Key error: {e}"
Expand Down

0 comments on commit 5222328

Please sign in to comment.