Skip to content

Commit

Permalink
Fix an error on Postgres installs
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Nov 20, 2024
1 parent 2d4b756 commit a78babb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/controllers/LogsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ public function actionGetLogs(): Response

$query = (new Query())
->from(['logs' => '{{%backinstock_records}}'])
->select(['logs.*', 'products.typeId AS productTypeId'])
->leftJoin('{{%commerce_variants}} variants', 'logs.variantId = variants.id')
->leftJoin('{{%commerce_products}} products', 'variants.productId = products.id')
->select([
'logs.*',
'products.typeId AS productTypeId',
])
->leftJoin('{{%commerce_variants}} variants', '[[logs.variantId]] = [[variants.id]]')
->leftJoin('{{%commerce_products}} products', '[[variants.productId]] = [[products.id]]')
->orderBy(['id' => SORT_DESC]);

if ($search) {
Expand Down

0 comments on commit a78babb

Please sign in to comment.