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 25, 2023
1 parent 4f906e1 commit f13860d
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 @@ -690,7 +690,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 @@ -729,7 +729,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 f13860d

Please sign in to comment.