Skip to content

Commit db17c91

Browse files
authored
Merge pull request #721 from dkackman/bug-719
2 parents 0f98bff + b022681 commit db17c91

File tree

1 file changed

+4
-4
lines changed
  • crates/sage-database/src/tables/assets

1 file changed

+4
-4
lines changed

crates/sage-database/src/tables/assets/asset.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ async fn insert_asset(conn: impl SqliteExecutor<'_>, asset: Asset) -> Result<()>
183183
)
184184
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
185185
ON CONFLICT(hash) DO UPDATE SET
186-
name = COALESCE(name, excluded.name),
187-
ticker = COALESCE(ticker, excluded.ticker),
188-
icon_url = COALESCE(icon_url, excluded.icon_url),
189-
description = COALESCE(description, excluded.description),
186+
name = COALESCE(excluded.name, name),
187+
ticker = COALESCE(excluded.ticker, ticker),
188+
icon_url = COALESCE(excluded.icon_url, icon_url),
189+
description = COALESCE(excluded.description, description),
190190
is_sensitive_content = is_sensitive_content OR excluded.is_sensitive_content
191191
",
192192
hash,

0 commit comments

Comments
 (0)