Skip to content
Snippets Groups Projects
Commit cb405aa4 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Refactor max_size method in update pages service

parent 7151fb75
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -130,9 +130,11 @@ module Projects
end
 
def max_size
current_application_settings.max_pages_size.megabytes.tap do |maximum|
return MAX_SIZE if maximum.zero? || maximum > MAX_SIZE
end
max_pages_size = current_application_settings.max_pages_size.megabytes
return MAX_SIZE if max_pages_size.zero?
[max_pages_size, MAX_SIZE].min
end
 
def tmp_path
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment