Fix comment::children_count
This commit is contained in:
@@ -12,7 +12,7 @@ begin
|
||||
from (
|
||||
select
|
||||
com.*,
|
||||
(select count(*) from "comment" c2 where c2.parents_ids @> array[com.id]) as children_count,
|
||||
(select count(c2) from "comment" c2 where c2.parent_comment_id = com.id) as children_count,
|
||||
find_reference_by_id(com.target_id, com.target_reference) as target,
|
||||
find_citizen_by_id(com.created_by_id) as created_by,
|
||||
count_vote(com.id) as votes
|
||||
|
||||
Reference in New Issue
Block a user