ElixirTeSS / TeSS

Training e-Support Service using Ruby on Rails.
Other
12 stars 12 forks source link

Ignore invalid attributes when scraping #990

Open fbacall opened 2 months ago

fbacall commented 2 months ago

When scraping resources, the various model validations can sometimes be overly strict.

For example when parsing a Bioschemas LearningResource, if a resource is marked-up with:

"educationalLevel": "Introductory"

which TeSS uses for the difficulty_level field, it will fail validation because TeSS uses a controlled vocab for this field and "Introductory" is not a valid option. This validation failure prevents the material being registered entirely.

Instead, TeSS could just ignore that one field and register the material anyway.