From c34498e2f8356d9d2f1fcb562fa419e8439d7704 Mon Sep 17 00:00:00 2001 From: Matthieu Bergel Date: Fri, 17 May 2024 08:14:09 +0000 Subject: [PATCH] docs(author): update comments --- db/model/Gdoc/GdocAuthor.ts | 5 +++++ db/model/Gdoc/GdocFactory.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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