From 8dbad16b7a8ec7d15713f6422fdfd0d429bd46fb Mon Sep 17 00:00:00 2001 From: minhtrung1997 <52932655+minhtrung1997@users.noreply.github.com> Date: Mon, 23 Sep 2024 17:51:12 +0700 Subject: [PATCH] Allow libraries function set_permission public lib and dataset Hi Galaxy I work with this API methods using this library. Such a wonderful lib By the way, if I want to make the library and dataset public, I think we can adjust like I committed Long to hear if this will make the user feel better --- bioblend/galaxy/libraries/__init__.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bioblend/galaxy/libraries/__init__.py b/bioblend/galaxy/libraries/__init__.py index e718b36c9..4c496866c 100644 --- a/bioblend/galaxy/libraries/__init__.py +++ b/bioblend/galaxy/libraries/__init__.py @@ -748,13 +748,13 @@ def set_library_permissions( :return: General information about the library """ payload: Dict[str, List[str]] = {} - if access_in: + if access_in is not None: payload["LIBRARY_ACCESS_in"] = access_in - if modify_in: + if modify_in is not None: payload["LIBRARY_MODIFY_in"] = modify_in - if add_in: + if add_in is not None: payload["LIBRARY_ADD_in"] = add_in - if manage_in: + if manage_in is not None: payload["LIBRARY_MANAGE_in"] = manage_in url = self._make_url(library_id) + "/permissions" return self._post(payload, url=url) @@ -789,11 +789,11 @@ def set_dataset_permissions( payload: Dict[str, Any] = { "action": "set_permissions", } - if access_in: + if access_in is not None: payload["access_ids[]"] = access_in - if modify_in: + if modify_in is not None: payload["modify_ids[]"] = modify_in - if manage_in: + if manage_in is not None: payload["manage_ids[]"] = manage_in url = "/".join((self._make_url(), "datasets", dataset_id, "permissions")) return self._post(payload, url=url)