Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit a0ff745

Browse files
authored
Fix database error: column reference is ambiguous (#310)
* Fix db error column reference name is ambiguous * remove console.log
1 parent 86aff15 commit a0ff745

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rest_server/src/models/marketplace_item.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,21 +102,21 @@ class MarketplaceItem {
102102
filterStatement[Op.or] = [
103103
{
104104
name: where(
105-
fn('LOWER', col('name')),
105+
fn('LOWER', col('"MarketplaceItem"."name"')),
106106
Op.substring,
107107
`%${lowerKeyword}%`,
108108
),
109109
},
110110
{
111111
author: where(
112-
fn('LOWER', col('author')),
112+
fn('LOWER', col('"MarketplaceItem"."author"')),
113113
Op.substring,
114114
`%${lowerKeyword}%`,
115115
),
116116
},
117117
{
118118
summary: where(
119-
fn('LOWER', col('summary')),
119+
fn('LOWER', col('"MarketplaceItem"."summary"')),
120120
Op.substring,
121121
`%${lowerKeyword}%`,
122122
),

0 commit comments

Comments
 (0)