File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -680,6 +680,7 @@ def get_entities_from_osw(
680680 model_to_cast_to ,
681681 credentials_fp ,
682682 domain ,
683+ osw_obj : OSW = None ,
683684 debug : bool = False ,
684685) -> list :
685686 """Gets entities from OSW, based on a category. The category can be specified by
@@ -706,8 +707,9 @@ def get_entities_from_osw(
706707 category_uuid = category_to_search .split ("OSW" )[- 1 ]
707708 else : # elif isinstance(category_to_search, uuid_module.UUID):
708709 category_uuid = str (category_to_search )
709- cred_man = CredentialManager (cred_filepath = credentials_fp )
710- osw_obj = OSW (site = WtSite (WtSite .WtSiteConfig (iri = domain , cred_mngr = cred_man )))
710+ if osw_obj is None :
711+ cred_man = CredentialManager (cred_filepath = credentials_fp )
712+ osw_obj = OSW (site = WtSite (WtSite .WtSiteConfig (iri = domain , cred_mngr = cred_man )))
711713 wtsite_obj = osw_obj .site
712714 entities_from_osw = []
713715 if debug :
You can’t perform that action at this time.
0 commit comments