Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### Server
- Enhance: リモートノートクリーニングジョブのスキップ処理のパフォーマンス改善
- Fix: PerUserDriveChart がシステム所有ファイル (userId が null) の更新で `"group"` の非NULL制約違反によりクラッシュする問題を修正 (#17498)


## 2026.5.4
Expand Down
4 changes: 4 additions & 0 deletions packages/backend/src/core/chart/charts/per-user-drive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ export default class PerUserDriveChart extends Chart<typeof schema> { // eslint-

@bindThis
public async update(file: MiDriveFile, isAdditional: boolean): Promise<void> {
// MiDriveFile.userId is nullable (system-owned files such as the instance
// icon/banner, fetched system avatars, custom emoji image uploads, etc.).
// Per-user drive accounting is not defined for ownerless files, so skip.
if (file.userId == null) return;
const fileSizeKb = file.size / 1000;
await this.commit({
'totalCount': isAdditional ? 1 : -1,
Expand Down
Loading