Skip to content

Commit

Permalink
Fix repository category update
Browse files Browse the repository at this point in the history
`category_ids[]` is not a valid agument for the update endpoint (it is
for create). To fix this I just call into bioblend instead of using the
custom put request. Fixes #1480
  • Loading branch information
mvdbeek committed Oct 28, 2024
1 parent cde40e5 commit 28b0897
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions planemo/shed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,20 +663,16 @@ def update_repository_for(ctx, tsi, id, repo_config):

_ensure_shed_description(description)

kwds = dict(
repo = tsi.repositories.update_repository_metadata(
id,
name=name,
synopsis=description,
type=repo_type,
synposis=description,
description=long_description,
remote_repository_url=remote_repository_url,
homepage_url=homepage_url,
category_ids=category_ids
)
if long_description is not None:
kwds["description"] = long_description
if remote_repository_url is not None:
kwds["remote_repository_url"] = remote_repository_url
if homepage_url is not None:
kwds["homepage_url"] = homepage_url
if category_ids is not None:
kwds["category_ids[]"] = category_ids
return bioblend.galaxy.client.Client._put(tsi.repositories, id=id, payload=kwds)
return repo


def create_repository_for(ctx, tsi, name, repo_config):
Expand Down

0 comments on commit 28b0897

Please sign in to comment.