Skip to content

Commit

Permalink
Fixed function to get path
Browse files Browse the repository at this point in the history
  • Loading branch information
svarona committed Sep 26, 2023
1 parent 8bda683 commit 3529b1e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions bu_isciii/new_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ def __init__(
)
sys.exit()
else:
self.path = bu_isciii.utils.get_service_paths(self.resolution_info)

self.path = bu_isciii.utils.get_service_paths(
"services_and_colaborations", self.resolution_info, "non_archived_path"
)
self.full_path = os.path.join(self.path, self.service_folder)

def create_folder(self):
Expand Down
14 changes: 7 additions & 7 deletions bu_isciii/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,25 +183,25 @@ def get_service_paths(service_type, resolution_info, archived_status):
service_path = os.path.join(
global_conf["archived_path"],
service_type,
resolution_info["serviceUserId"]["profile"]["profileCenter"],
resolution_info["serviceUserId"]["profile"][
"profileClassificationArea"
resolution_info["service_user_id"]["profile"]["profile_center"],
resolution_info["service_user_id"]["profile"][
"profile_classification_area"
].lower(),
)
if archived_status == "non_archived_path":
service_path = os.path.join(
global_conf["data_path"],
service_type,
resolution_info["Service"]["serviceUserId"]["profile"]["profileCenter"],
resolution_info["serviceUserId"]["profile"][
"profileClassificationArea"
resolution_info["service_user_id"]["profile"]["profile_center"],
resolution_info["service_user_id"]["profile"][
"profile_classification_area"
].lower(),
)
return service_path


def get_sftp_folder(resolution_info):
service_user = resolution_info["serviceUserId"]["username"]
service_user = resolution_info["service_user_id"]["username"]
json_file = os.path.join(os.path.dirname(__file__), "templates", "sftp_user.json")
user_sftp_file = open(json_file)
json_data = json.load(user_sftp_file)
Expand Down

0 comments on commit 3529b1e

Please sign in to comment.