Ensure weapons without awakenings do not expose key
This commit is contained in:
parent
d1979358d2
commit
03f459d249
1 changed files with 1 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ module Api
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
field :awakenings, if: ->(_field_name, w, _options) { w.awakenings } do |w|
|
field :awakenings, if: lambda { |_fn, obj, _opt| obj.awakenings.length.positive? } do |w|
|
||||||
w.awakenings.map do |a|
|
w.awakenings.map do |a|
|
||||||
AwakeningBlueprint.render_as_hash(a)
|
AwakeningBlueprint.render_as_hash(a)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue