提交 27e9b8bf 编写于 作者: R Robert Speicher

Merge branch 'sh-fix-failure-project-destroy' into 'master'

Fix "Can't modify frozen hash" error when project is destroyed

See merge request gitlab-org/gitlab-ce!17816
......@@ -88,7 +88,11 @@ module Projects
def attempt_rollback(project, message)
return unless project
project.update_attributes(delete_error: message, pending_delete: false)
# It's possible that the project was destroyed, but some after_commit
# hook failed and caused us to end up here. A destroyed model will be a frozen hash,
# which cannot be altered.
project.update_attributes(delete_error: message, pending_delete: false) unless project.destroyed?
log_error("Deletion failed on #{project.full_path} with the following message: #{message}")
end
......
---
title: Fix "Can't modify frozen hash" error when project is destroyed
merge_request:
author:
type: fixed
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册