Mentions légales du service

Skip to content
Snippets Groups Projects
Commit dd5f4152 authored by Teddy Valette's avatar Teddy Valette
Browse files

Revert "[gen/wiki/oar] Pick ramdom possible values if more than 20 for a property"

This reverts commit b7237e0d.
parent 65caf2e7
No related branches found
No related tags found
No related merge requests found
Pipeline #149763 passed
......@@ -281,8 +281,8 @@ class OarPropertiesGenerator < WikiGenerator
oar_properties.sort.to_h.each { |prop, prop_hash|
prop_hash["values"].sort!
if (prop_hash["values"].length > 20)
#Limit possible values to 20 random elements and mark the list as truncated
prop_hash["values"] = prop_hash["values"].sample(20).sort
#Limit possible values to 20 elements and mark the list as truncated
prop_hash["values"].slice!(0...-20)
prop_hash["values"].push("...")
end
@@properties[prop]["possible_values"] ||= prop_hash["values"].join(", ") unless @@properties[prop].nil?
......
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