diff options
author | Stan Hu <stanhu@gmail.com> | 2018-10-10 12:15:56 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-10-10 13:24:06 -0700 |
commit | fbb5953ec36ae3e53f9a07f5a0d1cf1b5e1ef209 (patch) | |
tree | 83045ae3ed3a36c35594b42bae665b10c25056de /changelogs | |
parent | 2efbc75fd427678a6a0b9910d1ba13f9065557ea (diff) | |
download | gitlab-ce-fbb5953ec36ae3e53f9a07f5a0d1cf1b5e1ef209.tar.gz |
Fix project deletion when there is a export available
Project deletions were failing with "Can't modify frozen hash" because:
1. Project#remove_exports was called in the after_destroy hook
2. This would remove the file and update ImportExportUpload
3. ImportExportUpload#save would attempt to write to a destroyed model
To avoid this, we just check if ImportExportUpload has been destroyed
before attempting to save it.
This would have a side effect of not running after_commit hooks to delete the
repository on disk, making it impossible to delete the project entirely.
Closes #52362
Diffstat (limited to 'changelogs')
-rw-r--r-- | changelogs/unreleased/sh-fix-project-deletion-with-export.yml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/changelogs/unreleased/sh-fix-project-deletion-with-export.yml b/changelogs/unreleased/sh-fix-project-deletion-with-export.yml new file mode 100644 index 00000000000..b9437f8ad6a --- /dev/null +++ b/changelogs/unreleased/sh-fix-project-deletion-with-export.yml @@ -0,0 +1,5 @@ +--- +title: Fix project deletion when there is a export available +merge_request: 22276 +author: +type: fixed |