Skip to content
Snippets Groups Projects
Commit 27e9b8bf authored by Robert Speicher's avatar Robert Speicher
Browse files

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
parents c2fedd73 ca63603d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
 
Loading
Loading
---
title: Fix "Can't modify frozen hash" error when project is destroyed
merge_request:
author:
type: fixed
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment