diff --git a/lib/PostText/Model/Thread.pm b/lib/PostText/Model/Thread.pm index ccb4b82..85d5da0 100644 --- a/lib/PostText/Model/Thread.pm +++ b/lib/PostText/Model/Thread.pm @@ -73,8 +73,8 @@ sub get_last_page($self) { } sub get_thread_count($self) { - $self->pg->db->query(<<~'END_SQL')->text() - SELECT COUNT(*) + $self->pg->db->query(<<~'END_SQL')->hash->{'count'} + SELECT COUNT(*) AS count FROM threads WHERE NOT hidden_status; END_SQL