Skip to content

Commit

Permalink
🐛 Fix bug in SQL query
Browse files Browse the repository at this point in the history
  • Loading branch information
danyx23 committed Mar 20, 2024
1 parent 713d246 commit 0055d9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions db/model/Gdoc/GdocFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,11 @@ export async function getAndLoadListedGdocPosts(
`-- sql
SELECT *
FROM posts_gdocs
WHERE published = 1
publicationContext: ${OwidGdocPublicationContext.listed}
WHERE published = 1 AND
publicationContext = :publicationContext AND
publishedAt <= NOW()
ORDER BY publishedAt DESC`,
{}
{ publicationContext: OwidGdocPublicationContext.listed }
)
const ids = rows.map((row) => row.id)
const tags = await knexRaw<DbPlainTag>(
Expand Down

0 comments on commit 0055d9c

Please sign in to comment.