Skip to content

Commit

Permalink
Merge pull request #2437 from owid/bake-variables-used-in-explorers
Browse files Browse the repository at this point in the history
fix: bake indicators used in explorers
  • Loading branch information
sophiamersmann authored Jul 19, 2023
2 parents 2cafd0c + ac1aea1 commit 9b1028b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions baker/GrapherBaker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,12 @@ export const bakeSingleGrapherChart = async (
export const bakeAllChangedGrapherPagesVariablesPngSvgAndDeleteRemovedGraphers =
async (bakedSiteDir: string) => {
const variablesToBake: { varId: number }[] =
await db.queryMysql(`select distinct vars.varID as varId
from
charts c,
await db.queryMysql(`select vars.varID as varId
from charts c,
json_table(c.config, '$.dimensions[*]' columns (varID integer path '$.variableId') ) as vars
where JSON_EXTRACT(c.config, '$.isPublished')=true`)
where JSON_EXTRACT(c.config, '$.isPublished')=true
union
select variableId as varId from explorer_variables`)

const chartsToBake: { id: number; config: string; slug: string }[] =
await db.queryMysql(`
Expand Down

0 comments on commit 9b1028b

Please sign in to comment.