2323from helpers .DynamicLogs import get_logger
2424from providers .EcoTaxoServer import EcoTaxoServerClient
2525from .helpers .Service import Service
26- from API_models .taxonomy import TaxoWormsModel
2726
2827logger = get_logger (__name__ )
2928
@@ -78,7 +77,7 @@ def get_taxon_by_id(self, taxon_id: int) -> str:
7877 ret = self .client .call ("/gettaxon/" , {"filtertype" : "id" , "id" : taxon_id })
7978 return ret .json ()
8079
81- def add_taxon (self , current_user_id : UserIDT , taxon_params : Dict ) -> str :
80+ def add_taxon (self , current_user_id : UserIDT , taxon_params : Dict ) -> Any :
8281 # Security barrier, user must be admin or manager in any project
8382 # creation_datetime: str, =
8483 _user = RightsBO .user_can_add_taxonomy (self .ro_session , current_user_id )
@@ -99,12 +98,12 @@ def add_worms_taxon(
9998 self ,
10099 aphia_id : int ,
101100 current_user_id : UserIDT ,
102- ) -> Dict :
101+ ) -> Any :
103102 _user = RightsBO .user_can_add_taxonomy (self .ro_session , current_user_id )
104103 current_user : User = self .session .query (User ).get (current_user_id )
105104 taxon = {"aphia_id" : aphia_id , "creator_email" : current_user .email }
106105 ret = self .client .call ("/addwormstaxon/" , taxon )
107- return ret
106+ return ret . json ()
108107
109108 def push_stats (self ) -> Any :
110109 """
0 commit comments