adsabs / orcid-service

Web service for ORCID
MIT License
1 stars 10 forks source link

Bug: putcode is sometimes stored as a number, sometimes a string #46

Closed kelockhart closed 1 year ago

kelockhart commented 1 year ago

If there is no external identifier, the putcode is converted into a string for storage (https://github.com/adsabs/orcid-service/blob/master/orcid_service/views.py#L573). Otherwise, it's taken as-is from the ORCID API return - in this case, the type is a number (https://github.com/adsabs/orcid-service/blob/master/orcid_service/views.py#L612).

The fix should leave the types as numbers, and remove the string conversion.