prevent parsing on unwritable properties

pull/6827/head
Jens Ulferts 7 years ago
parent f19d321739
commit 42e1557192
No known key found for this signature in database
GPG Key ID: 3CAA4B1182CF5308
  1. 3
      lib/open_project/costs/engine.rb

@ -173,16 +173,19 @@ module OpenProject::Costs
property :labor_costs, property :labor_costs,
exec_context: :decorator, exec_context: :decorator,
if: ->(*) { labor_costs_visible? }, if: ->(*) { labor_costs_visible? },
skip_parse: true,
render_nil: true render_nil: true
property :material_costs, property :material_costs,
exec_context: :decorator, exec_context: :decorator,
if: ->(*) { material_costs_visible? }, if: ->(*) { material_costs_visible? },
skip_parse: true,
render_nil: true render_nil: true
property :overall_costs, property :overall_costs,
exec_context: :decorator, exec_context: :decorator,
if: ->(*) { overall_costs_visible? }, if: ->(*) { overall_costs_visible? },
skip_parse: true,
render_nil: true render_nil: true
resource :costsByType, resource :costsByType,

Loading…
Cancel
Save