dandi / dandi-archive

DANDI API server and Web app
https://dandiarchive.org
13 stars 10 forks source link

organization as author #1472

Closed bendichter closed 1 year ago

bendichter commented 1 year ago

In dandiset 149, an attempt was made to list an organization as an author:

image

This caused a validation error in the metadata. The IBL does like to list "International Brain Laboratory" as an author, e.g. here.

If we want to allow this, we should allow it in the schema. If we want to disallow this, we should prevent it in the metadata editor.

satra commented 1 year ago

what is the validation error that you received? is it because the url is not wellformed (https:// missing)?

bendichter commented 1 year ago

@satra

ValidationError: 4 validation errors for Dandiset
contributor -> 0 -> schemaKey
  schemaKey Organization does not match classname Person (type=value_error)
contributor -> 0 -> name
  string does not match regex "^([\w\s\-\.']+),\s+([\w\s\-\.']+)$" (type=value_error.str.regex; pattern=^([\w\s\-\.']+),\s+([\w\s\-\.']+)$)
contributor -> 0 -> url
  invalid or missing URL scheme (type=value_error.url.scheme)
contributor -> 0 -> url
  invalid or missing URL scheme (type=value_error.url.scheme)
image
satra commented 1 year ago

did you try adding https:// for the url?

bendichter commented 1 year ago

@satra ok yes, that was the issue. I find that difficult to decipher from the validation error messages from the API and from the Web UI. The web UI says nothing about URL at all. The validation errors start with two errors that are irrelevant. I suppose fixing #1477 would fix this anyway, so I'll close in favor of that issue.