From b83347388d17dfd58c9f3d123d3d96d050ca6e9b Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 16 Aug 2018 09:42:55 -0700 Subject: ORCIDs can end in X character --- python/fatcat_client/api/default_api.py | 4 ++-- python/fatcat_client/models/creator_entity.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'python/fatcat_client') diff --git a/python/fatcat_client/api/default_api.py b/python/fatcat_client/api/default_api.py index b7f23e25..acd33c88 100644 --- a/python/fatcat_client/api/default_api.py +++ b/python/fatcat_client/api/default_api.py @@ -3255,8 +3255,8 @@ class DefaultApi(object): if ('orcid' in params and len(params['orcid']) < 19): raise ValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, length must be greater than or equal to `19`") # noqa: E501 - if 'orcid' in params and not re.search('\\d{4}-\\d{4}-\\d{4}-\\d{4}', params['orcid']): # noqa: E501 - raise ValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, must conform to the pattern `/\\d{4}-\\d{4}-\\d{4}-\\d{4}/`") # noqa: E501 + if 'orcid' in params and not re.search('\\d{4}-\\d{4}-\\d{4}-\\d{3}[\\dX]', params['orcid']): # noqa: E501 + raise ValueError("Invalid value for parameter `orcid` when calling `lookup_creator`, must conform to the pattern `/\\d{4}-\\d{4}-\\d{4}-\\d{3}[\\dX]/`") # noqa: E501 collection_formats = {} path_params = {} diff --git a/python/fatcat_client/models/creator_entity.py b/python/fatcat_client/models/creator_entity.py index a9e459ee..de096281 100644 --- a/python/fatcat_client/models/creator_entity.py +++ b/python/fatcat_client/models/creator_entity.py @@ -139,8 +139,8 @@ class CreatorEntity(object): raise ValueError("Invalid value for `orcid`, length must be less than or equal to `19`") # noqa: E501 if orcid is not None and len(orcid) < 19: raise ValueError("Invalid value for `orcid`, length must be greater than or equal to `19`") # noqa: E501 - if orcid is not None and not re.search('\\d{4}-\\d{4}-\\d{4}-\\d{4}', orcid): # noqa: E501 - raise ValueError("Invalid value for `orcid`, must be a follow pattern or equal to `/\\d{4}-\\d{4}-\\d{4}-\\d{4}/`") # noqa: E501 + if orcid is not None and not re.search('\\d{4}-\\d{4}-\\d{4}-\\d{3}[\\dX]', orcid): # noqa: E501 + raise ValueError("Invalid value for `orcid`, must be a follow pattern or equal to `/\\d{4}-\\d{4}-\\d{4}-\\d{3}[\\dX]/`") # noqa: E501 self._orcid = orcid -- cgit v1.2.3