fix: Applying the same parameter as for IDs in created_by_ref UUIDs

master
chrisr3d 2018-12-05 23:50:02 +01:00
parent 86536b43b1
commit 3ae38fe687
1 changed files with 6 additions and 2 deletions

View File

@ -345,8 +345,12 @@ class ReferenceProperty(Property):
if self.type: if self.type:
if not value.startswith(self.type): if not value.startswith(self.type):
raise ValueError("must start with '{0}'.".format(self.type)) raise ValueError("must start with '{0}'.".format(self.type))
if not ID_REGEX.match(value): if hasattr(self, 'interoperability') and self.interoperability:
raise ValueError(ERROR_INVALID_ID) if not ID_REGEX_interoperability.match(value):
raise ValueError(ERROR_INVALID_ID)
else:
if not ID_REGEX.match(value):
raise ValueError(ERROR_INVALID_ID)
return value return value