Page MenuHomePhabricator

D7435.id25192.diff
No OneTemporary

D7435.id25192.diff

diff --git a/keyserver/src/updaters/thread-updaters.js b/keyserver/src/updaters/thread-updaters.js
--- a/keyserver/src/updaters/thread-updaters.js
+++ b/keyserver/src/updaters/thread-updaters.js
@@ -637,15 +637,17 @@
UPDATE uploads
SET container = NULL
WHERE container = ${request.threadID}
- AND ${avatarUploadID} IS NOT NULL
- AND EXISTS (
- SELECT 1
- FROM uploads
- WHERE id = ${avatarUploadID}
- AND ${avatarUploadID} IS NOT NULL
- AND uploader = ${viewer.userID}
- AND container IS NULL
- AND thread IS NULL
+ AND (
+ ${avatarUploadID} IS NULL
+ OR EXISTS (
+ SELECT 1
+ FROM uploads
+ WHERE id = ${avatarUploadID}
+ AND ${avatarUploadID} IS NOT NULL
+ AND uploader = ${viewer.userID}
+ AND container IS NULL
+ AND thread IS NULL
+ )
);
UPDATE uploads

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 1:45 PM (21 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2584937
Default Alt Text
D7435.id25192.diff (1 KB)

Event Timeline