chg: get_uuid_or_id_from_abstract_misp accepts dict

pull/749/head
Raphaël Vinot 2021-03-30 14:31:31 +02:00
parent c68ee576b3
commit 5cc994e253
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ ToIDSType = TypeVar('ToIDSType', str, int, bool)
logger = logging.getLogger('pymisp')
def get_uuid_or_id_from_abstract_misp(obj: Union[AbstractMISP, int, str, UUID]) -> Union[str, int]:
def get_uuid_or_id_from_abstract_misp(obj: Union[AbstractMISP, int, str, UUID, dict]) -> Union[str, int]:
"""Extract the relevant ID accordingly to the given type passed as parameter"""
if isinstance(obj, UUID):
return str(obj)