Commit d925adfa authored by Simon Delamare's avatar Simon Delamare
Browse files

[admin] Fix generation of wattmetre OAR property

parent 3eb1b84b
......@@ -48,7 +48,8 @@ module Grid5000
h['gpu_count'] = properties['gpu']['gpu_count']
h['gpu_model'] = properties['gpu']['gpu_model']
properties["monitoring"] ||= {}
h['wattmeter'] = properties['monitoring']['wattmeter'] ? properties['monitoring']['wattmeter'].upcase == "SHARED" ? "SHARED" : "YES" : "NO"
h['wattmeter'] = (properties['monitoring']['wattmeter'].is_a?(String) and properties['monitoring']['wattmeter'].upcase == "SHARED") ? "SHARED" \
: properties['monitoring']['wattmeter'] ? "YES" : "NO"
h['rconsole'] = properties['monitoring']['rconsole'] == false ? "NO" : "YES"
h
}
......
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