Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
ca63603d
Commit
ca63603d
authored
Mar 16, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix "Can't modify frozen hash" error when project is destroyed
Partial fix to #44378
parent
ea5221ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
app/services/projects/destroy_service.rb
app/services/projects/destroy_service.rb
+5
-1
changelogs/unreleased/sh-fix-failure-project-destroy.yml
changelogs/unreleased/sh-fix-failure-project-destroy.yml
+5
-0
No files found.
app/services/projects/destroy_service.rb
View file @
ca63603d
...
@@ -88,7 +88,11 @@ module Projects
...
@@ -88,7 +88,11 @@ module Projects
def
attempt_rollback
(
project
,
message
)
def
attempt_rollback
(
project
,
message
)
return
unless
project
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
}
"
)
log_error
(
"Deletion failed on
#{
project
.
full_path
}
with the following message:
#{
message
}
"
)
end
end
...
...
changelogs/unreleased/sh-fix-failure-project-destroy.yml
0 → 100644
View file @
ca63603d
---
title
:
Fix "Can't modify frozen hash" error when project is destroyed
merge_request
:
author
:
type
:
fixed
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment