Fix orphaned attachments when deleting the whole account

This commit is contained in:
Stanko K.R.
2026-02-02 14:35:01 +01:00
parent ac7d0308ac
commit 6e6e4e9b5a
@@ -22,7 +22,7 @@ module ActiveStorage
private
def purge_dependent_blob_later
if dependent == :purge_later && !@purge_mode
if (record.nil? || dependent == :purge_later) && !@purge_mode
purge_blob_if_last(:purge_later)
end
end