Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Org parsing sometimes results in empty string for name #8

Closed
mhucka opened this issue May 22, 2023 · 1 comment
Closed

Org parsing sometimes results in empty string for name #8

mhucka opened this issue May 22, 2023 · 1 comment
Assignees
Labels
Bug 🐛 Something isn't working Priority ★★★ High priority

Comments

@mhucka
Copy link
Contributor

mhucka commented May 22, 2023

This products an empty org name in the resulting contributor element:

    "copyrightHolder": [
        {
            "@id": "https://ror.org/05dxps055",
            "@type": "Organization",
            "name": "California Institute of Technology"
        }
    ],
@mhucka mhucka added the Bug 🐛 Something isn't working label May 22, 2023
@mhucka mhucka self-assigned this May 22, 2023
@mhucka mhucka added the Priority ★★★ High priority label May 22, 2023
@mhucka
Copy link
Contributor Author

mhucka commented May 22, 2023

Fixed in commit 2a01484.

mhucka added a commit that referenced this issue May 22, 2023
The original problem was that `_org_from_dict(...)` was used for both
organizational entities used as (e.g.) creators or contributors, and
for affiliations. It turns out that the InvenioRDM requirements for
the dict in these two cases is different: one uses a field named
`identifier` and the other names it `id`.

While working on the solution, I realized that the algorithm could be
improved. There's no good reason not to use the value of a `name`
field if it's provided, so we try that first instead of trying to get
it from the identifier. Also, the function now tries to look up org
names in ROR if it's given an identifier and no name.
@mhucka mhucka closed this as completed May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Something isn't working Priority ★★★ High priority
Projects
None yet
Development

No branches or pull requests

1 participant