fix schema generation when no type is set

will happen for an UntypedWorkPackageSchema, in the `project/:id/work_packages/columns` endpoint
pull/6827/head
Jan Sandbrink 9 years ago
parent 44b371cf3c
commit 2d6c813d91
  1. 3
      lib/open_project/backlogs/engine.rb

@ -178,7 +178,8 @@ module OpenProject::Backlogs
type: 'Integer',
required: false,
show_if: -> (*) {
represented.project.backlogs_enabled? && represented.type.story?
represented.project.backlogs_enabled? &&
(!represented.type || represented.type.story?)
}
schema :remaining_time,

Loading…
Cancel
Save