Merge branch 'master' of github.com:oasis-open/cti-python-stix2

master
chrisr3d 2019-07-01 08:51:26 +02:00
commit b204b9fdda
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ class Bundle(_STIXBase):
def get_obj(self, obj_uuid):
if "objects" in self._inner:
found_objs = [elem for elem in self.objects if elem.id == obj_uuid]
found_objs = [elem for elem in self.objects if elem['id'] == obj_uuid]
if found_objs == []:
raise KeyError("'%s' does not match the id property of any of the bundle's objects" % obj_uuid)
return found_objs

View File

@ -41,7 +41,7 @@ class Bundle(_STIXBase):
def get_obj(self, obj_uuid):
if "objects" in self._inner:
found_objs = [elem for elem in self.objects if elem.id == obj_uuid]
found_objs = [elem for elem in self.objects if elem['id'] == obj_uuid]
if found_objs == []:
raise KeyError("'%s' does not match the id property of any of the bundle's objects" % obj_uuid)
return found_objs