Skip to content

Commit

Permalink
fix v3 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mh-Asmi authored and tuxpiper committed Jun 17, 2024
1 parent 8d631ac commit 3fb3cea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public function getResponseRecipients($form_id, $created_after, $created_before)
->from('posts')
->where('form_id', '=', $form_id);
$query = $this->betweenDates($query, 'created', $created_before, $created_after);
$query = DB::select([DB::expr('COUNT(contact_id)'), 'total'])
$query = DB::select([DB::expr('COUNT(messages.contact_id)'), 'total'])
->distinct(true)
->from([$query,'targeted_posts'])
->join('messages', 'INNER')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private function queryForWeb($survey_id, $created_after, $created_before)
public function getResponseRecipients($survey_id, SurveyStatesSearchFields $search_fields)
{
$query = DB::table('posts')
->selectRaw('COUNT(contact_id) as total')
->selectRaw('COUNT(messages.contact_id) as total')
->distinct()
->join('messages', 'messages.post_id', '=', 'posts.id')
->where('form_id', '=', $survey_id)
Expand Down

0 comments on commit 3fb3cea

Please sign in to comment.