Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3367094
D7435.id25192.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7435.id25192.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D7435: [keyserver] Fix `avatarUpdateQuery`
Attached
Detach File
Event Timeline
Log In to Comment