fix: Avoiding inconsistency in the id prefixes causing uuid check issues

master
chrisr3d 2020-01-08 16:58:34 +01:00
parent c8cd84925b
commit 36e4b41b9c
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 2 additions and 2 deletions

View File

@ -478,14 +478,14 @@ class ReferenceProperty(Property):
ref_valid_types = enumerate_types(self.valid_types, 'v' + self.spec_version.replace(".", "")) ref_valid_types = enumerate_types(self.valid_types, 'v' + self.spec_version.replace(".", ""))
if possible_prefix in ref_valid_types: if possible_prefix in ref_valid_types:
required_prefix = possible_prefix required_prefix = possible_prefix + '--'
else: else:
raise ValueError("The type-specifying prefix '%s' for this property is not valid" % (possible_prefix)) raise ValueError("The type-specifying prefix '%s' for this property is not valid" % (possible_prefix))
elif self.invalid_types: elif self.invalid_types:
ref_invalid_types = enumerate_types(self.invalid_types, 'v' + self.spec_version.replace(".", "")) ref_invalid_types = enumerate_types(self.invalid_types, 'v' + self.spec_version.replace(".", ""))
if possible_prefix not in ref_invalid_types: if possible_prefix not in ref_invalid_types:
required_prefix = possible_prefix required_prefix = possible_prefix + '--'
else: else:
raise ValueError("An invalid type-specifying prefix '%s' was specified for this property" % (possible_prefix, value)) 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 interoperability = self.interoperability if hasattr(self, 'interoperability') and self.interoperability else False