Canapin
(Coin-coin le Canapin)
2026 年 3 月 11 日午後 2:53
1
ユーザーの投稿の削除を試行しました。
投稿が削除されなかったため、Sidekiqと/logsを確認したところ、削除プロセスでエラーが返されました。
Job exception: PG::ForeignKeyViolation: ERROR: update or delete on table "reviewables" violates foreign key constraint "fk_rails_2fe5fa5cd0" on table "reviewable_notes"
DETAIL: Key (id)=(7870) is still referenced from table "reviewable_notes".
このレビュー可能なアイテムは15日前に承認されており、実際に関連付けられているノートが3つあります。
フラグID 7870を作成したユーザーは、投稿を削除しようとしているユーザーと同じであり、これが問題の原因だと推測されます。
しかし、このエラーを解消し、ユーザーのアカウントを削除するにはどうすればよいでしょうか?
これはバグのようで、現時点ではコメントを削除する必要があります。
Thanks! Your guess was spot on. User had few flagged posts by moderators and one of them had a note added. After deleting the note I could then successfully delete user all users posts and user it self.
By the way, is the bug already fixed in default branch? Maybe it’s time for updates.
EDIT: note on version/build for reference of any others that maybe encounter similar issue: v2026.1.0-latest mid-January container build on default tests-passed branch.
「いいね!」 1