Commit eb1f9651 authored by Robert Speicher's avatar Robert Speicher

Yield to an optional block in Projects::UpdateService

See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5825#note_75764799
parent d3c48793
......@@ -19,6 +19,8 @@ module Projects
ensure_wiki_exists if enabling_wiki?
yield if block_given?
if project.update_attributes(params.except(:default_branch))
if project.previous_changes.include?('path')
project.rename_repo
......
......@@ -17,16 +17,16 @@ module EE
wiki_was_enabled = project.wiki_enabled?
limit = params.delete(:repository_size_limit)
result = super
if result[:status] == :success
result = super do
# Repository size limit comes as MB from the view
project.repository_size_limit = ::Gitlab::Utils.try_megabytes_to_bytes(limit) if limit
if changing_storage_size?
project.change_repository_storage(params.delete(:repository_storage))
end
end
if result[:status] == :success
cleanup_approvers(project) if should_remove_old_approvers
log_audit_events
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment