From 304a5a1a283664d2bc78d0f8c36c46eb84ab39af Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Tue, 12 Jun 2018 16:28:35 +0200 Subject: [PATCH] adapt form parsing to core --- lib/open_project/backlogs/engine.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/open_project/backlogs/engine.rb b/lib/open_project/backlogs/engine.rb index 411aa1ee83..f878234f13 100644 --- a/lib/open_project/backlogs/engine.rb +++ b/lib/open_project/backlogs/engine.rb @@ -141,16 +141,16 @@ module OpenProject::Backlogs extend_api_response(:v3, :work_packages, :work_package) do property :position, render_nil: true, - if: ->(*) { backlogs_enabled? && type && type.passes_attribute_constraint?(:position) } + skip_render: ->(*) { !(backlogs_enabled? && type && type.passes_attribute_constraint?(:position)) } property :story_points, render_nil: true, - if: ->(*) { backlogs_enabled? && type && type.passes_attribute_constraint?(:story_points) } + skip_render: ->(*) { !(backlogs_enabled? && type && type.passes_attribute_constraint?(:story_points)) } property :remaining_time, exec_context: :decorator, render_nil: true, - if: ->(represented:, **) { represented.backlogs_enabled? } + skip_render: ->(represented:, **) { !represented.backlogs_enabled? } # cannot use def here as it wouldn't define the method on the representer define_method :remaining_time do