Skip to content

Commit

Permalink
fix(SFT-1689): broken query when date filters applied
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavs-gutmanis committed Jan 6, 2025
1 parent 4c0ade3 commit 52c4084
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/plugin/src/Models/Pro/ExportProfileModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ public function getQuery(): SubmissionQuery

$dateRangeStart = $this->getDateRangeStart();
if ($dateRangeStart) {
$query->andWhere(['>=', 'dateCreated', Db::prepareDateForDb($dateRangeStart)]);
$query->andWhere(['>=', $table.'.[[dateCreated]]', Db::prepareDateForDb($dateRangeStart)]);
}

$dateRangeEnd = $this->getDateRangeEnd();
if ($dateRangeEnd) {
$query->andWhere(['<=', 'dateCreated', Db::prepareDateForDb($dateRangeEnd)]);
$query->andWhere(['<=', $table.'.[[dateCreated]]', Db::prepareDateForDb($dateRangeEnd)]);
}

if ($this->filters) {
Expand Down

0 comments on commit 52c4084

Please sign in to comment.