diff --git a/db/model/Gdoc/GdocAuthor.ts b/db/model/Gdoc/GdocAuthor.ts index 83ccd920aef..05d1dfff501 100644 --- a/db/model/Gdoc/GdocAuthor.ts +++ b/db/model/Gdoc/GdocAuthor.ts @@ -49,6 +49,11 @@ export class GdocAuthor extends GdocBase implements OwidGdocAuthorInterface { // are ignored. Even after the assign, gdoc._enrichedSubclassContent() // will then still accurately target the GdocAuthor method, and not the // GdocBase method. + + // see + // https://github.com/owid/owid-grapher/pull/3600#issuecomment-2116990248 + // for a more detailed presentation on this topic + Object.assign(gdoc, obj) return gdoc } diff --git a/db/model/Gdoc/GdocFactory.ts b/db/model/Gdoc/GdocFactory.ts index 584580d6530..34e93715670 100644 --- a/db/model/Gdoc/GdocFactory.ts +++ b/db/model/Gdoc/GdocFactory.ts @@ -111,7 +111,7 @@ export async function createGdocAndInsertIntoDb( // enrichments are not present on the Gdoc subclass when loading from the DB // (GdocsContentSource.Internal), since subclass enrichements are only done // while fetching the live gdocs (GdocsContentSource.Gdocs) in - // loadFromGdocBase(). + // loadGdocFromGdocBase(). await upsertGdoc(knex, gdoc) return gdoc