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)