Skip to content

Commit

Permalink
Category reworking..
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Jan 31, 2023
1 parent 8be30c0 commit 9c6ce31
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/tool_shed/webapp/api/categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,8 @@ def create(self, trans, payload, **kwd):
description=payload.get("description", ""),
)
category: Category = self.category_manager.create(trans, request)
category_dict = category.to_dict(view="element", value_mapper=get_value_mapper(trans.app))
category_dict = self.category_manager.to_dict(category)
category_dict["message"] = f"Category '{str(category.name)}' has been created"
category_dict["url"] = web.url_for(
controller="categories", action="show", id=trans.security.encode_id(category.id)
)
return category_dict

@expose_api_anonymous_and_sessionless
Expand Down

0 comments on commit 9c6ce31

Please sign in to comment.