owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.35k stars 227 forks source link

Creating a new author fails on unenriched socials block #3576

Closed mlbrgl closed 1 month ago

mlbrgl commented 2 months ago

When creating a new author, createGdocAndInsertIntoDb calls loadGdocFromGdocBase with an actual class instance. This means Object.assign(gdoc, obj) overrides _enrichSubclassContent with the base class default implementation, which fails to run the subcalss enrichment.

In the case of authors, this enrichment is necessary for the proper parsing of ArchieML content, so this fails visibly. In other cases, it probably fails more silently.

Currently, this blocks the creation of authors, but we should also evaluate how this affects other types.