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

Fix/SK-1259 | Use api/v1 for set_active_package in APIClient #775

Merged
merged 5 commits into from
Jan 23, 2025
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions fedn/network/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def download_package(self, path: str):
else:
return {"success": False, "message": "Failed to download package."}

def set_active_package(self, path: str, helper: str, name: str = None, description: str = None):
def set_active_package(self, path: str, helper: str, name: str = "", description: str = ""):
Wrede marked this conversation as resolved.
Show resolved Hide resolved
"""Set the compute package in the statestore.

:param path: The file path of the compute package to set.
Expand All @@ -442,7 +442,7 @@ def set_active_package(self, path: str, helper: str, name: str = None, descripti
"""
with open(path, "rb") as file:
response = requests.post(
self._get_url("set_package"),
self._get_url_api_v1("packages"),
files={"file": file},
data={"helper": helper, "name": name, "description": description},
verify=self.verify,
Expand Down
Loading