Skip to content

Commit

Permalink
🔨 make sure pageviews as 0 and not null
Browse files Browse the repository at this point in the history
  • Loading branch information
danyx23 committed Oct 13, 2023
1 parent 27c5865 commit 17b0dc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/wpdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ export const getRelatedResearchAndWritingForVariable = async (
coalesce(csr.chart_id, c.id) as chartId,
p.authors as authors,
'' as thumbnail, -- TODO: add thumbnail once we have it
pv.views_365d as pageviews,
coalesce(pv.views_365d, 0) as pageviews,
'wordpress' as post_source
from
posts_links pl
Expand Down Expand Up @@ -718,7 +718,7 @@ export const getRelatedResearchAndWritingForVariable = async (
coalesce(csr.chart_id, c.id) as chartId,
p.content ->> '$.authors' as authors,
p.content ->> '$."featured-image"' as thumbnail,
pv.views_365d as pageviews,
coalesce(pv.views_365d, 0) as pageviews,
'gdocs' as post_source
from
posts_gdocs_links pl
Expand Down

0 comments on commit 17b0dc7

Please sign in to comment.