mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Some typing for api/categories.py
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import logging
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
Dict,
|
||||
)
|
||||
@@ -84,6 +85,7 @@ class CategoriesController(BaseAPIController):
|
||||
sort_order = kwd.get("sort_order", "asc")
|
||||
page = kwd.get("page", None)
|
||||
category = suc.get_category(self.app, category_id)
|
||||
category_dict: Dict[str, Any]
|
||||
if category is None:
|
||||
category_dict = dict(message=f"Unable to locate category record for id {str(id)}.", status="error")
|
||||
return category_dict
|
||||
|
||||
Reference in New Issue
Block a user