Commit d3c48793 authored by Robert Speicher's avatar Robert Speicher

Reorder size limit and storage size checks in Project update service

They're now performed after the `super`.
parent a6e36672
...@@ -16,17 +16,17 @@ module EE ...@@ -16,17 +16,17 @@ module EE
should_remove_old_approvers = params.delete(:remove_old_approvers) should_remove_old_approvers = params.delete(:remove_old_approvers)
wiki_was_enabled = project.wiki_enabled? wiki_was_enabled = project.wiki_enabled?
# Repository size limit comes as MB from the view
limit = params.delete(:repository_size_limit) limit = params.delete(:repository_size_limit)
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
result = super result = super
if result[:status] == :success if result[:status] == :success
# 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
cleanup_approvers(project) if should_remove_old_approvers cleanup_approvers(project) if should_remove_old_approvers
log_audit_events 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