Commit 2c364a79 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'cherry-pick-401d3a48' into 'master'

pages: Fix "undefined local variable or method `total_size'" when maximum page size is exceeded

Seems like a simple fix - total_size is unqualified in the error message, leading to a NoMethodError being raised instead of the expected error. 

Suggests some tests are missing, but I'm on work time and in a bit of a hurry!

I suspect there's an underlying issue: The admin site says that a maximum pages size of 0 is "unlimited", so I set it to 0. This error then arose trying to build pages, implying 0 actually means 0 in this context at the moment.


See merge request !356
parents 531f5b57 5b627aaf
...@@ -85,7 +85,7 @@ module Projects ...@@ -85,7 +85,7 @@ module Projects
public_entry = build.artifacts_metadata_entry(SITE_PATH, recursive: true) public_entry = build.artifacts_metadata_entry(SITE_PATH, recursive: true)
if public_entry.total_size > max_size if public_entry.total_size > max_size
raise "artifacts for pages are too large: #{total_size}" raise "artifacts for pages are too large: #{public_entry.total_size}"
end end
# Requires UnZip at least 6.00 Info-ZIP. # Requires UnZip at least 6.00 Info-ZIP.
......
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