Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed some API variables and errors #161

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading