Skip to content

Commit 223814b

Browse files
committed
fix v3 tests
1 parent 0f7a351 commit 223814b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Ushahidi/Modules/V3/Repository/Form/StatsRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ public function getResponseRecipients($form_id, $created_after, $created_before)
318318
->from('posts')
319319
->where('form_id', '=', $form_id);
320320
$query = $this->betweenDates($query, 'created', $created_before, $created_after);
321-
$query = DB::select([DB::expr('COUNT(contact_id)'), 'total'])
321+
$query = DB::select([DB::expr('COUNT(messages.contact_id)'), 'total'])
322322
->distinct(true)
323323
->from([$query,'targeted_posts'])
324324
->join('messages', 'INNER')

src/Ushahidi/Modules/V5/Repository/Survey/EloquentSurveyStatesRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ private function queryForWeb($survey_id, $created_after, $created_before)
176176
public function getResponseRecipients($survey_id, SurveyStatesSearchFields $search_fields)
177177
{
178178
$query = DB::table('posts')
179-
->selectRaw('COUNT(contact_id) as total')
179+
->selectRaw('COUNT(messages.contact_id) as total')
180180
->distinct()
181181
->join('messages', 'messages.post_id', '=', 'posts.id')
182182
->where('form_id', '=', $survey_id)

0 commit comments

Comments
 (0)