Project deletions were failing with "Can't modify frozen hash" because:
-
Project#remove_exports
was being called in theafter_destroy
hook - This would remove the file and update the
ImportExportUpload
entry -
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 (closed)