From 36e4b41b9ca20e3010317a2a1d5ed09efc89b5e6 Mon Sep 17 00:00:00 2001 From: chrisr3d Date: Wed, 8 Jan 2020 16:58:34 +0100 Subject: [PATCH] fix: Avoiding inconsistency in the id prefixes causing uuid check issues --- stix2/properties.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stix2/properties.py b/stix2/properties.py index 7024e50..2983bad 100644 --- a/stix2/properties.py +++ b/stix2/properties.py @@ -478,14 +478,14 @@ class ReferenceProperty(Property): ref_valid_types = enumerate_types(self.valid_types, 'v' + self.spec_version.replace(".", "")) if possible_prefix in ref_valid_types: - required_prefix = possible_prefix + required_prefix = possible_prefix + '--' else: raise ValueError("The type-specifying prefix '%s' for this property is not valid" % (possible_prefix)) elif self.invalid_types: ref_invalid_types = enumerate_types(self.invalid_types, 'v' + self.spec_version.replace(".", "")) if possible_prefix not in ref_invalid_types: - required_prefix = possible_prefix + required_prefix = possible_prefix + '--' else: raise ValueError("An invalid type-specifying prefix '%s' was specified for this property" % (possible_prefix, value)) interoperability = self.interoperability if hasattr(self, 'interoperability') and self.interoperability else False