Improve method naming and implementation

pull/2598/head
Alexander Bach 10 years ago
parent 73825c76b4
commit 35af232afd
  1. 8
      lib/api/v3/work_packages/schema/work_package_schema.rb

@ -83,15 +83,15 @@ module API
Setting.work_package_done_ratio == 'disabled'
return false
end
work_package_present_and_parent?
is_leaf_or_nil?(@work_package)
end
def estimated_time_writable?
work_package_present_and_parent?
is_leaf_or_nil?(@work_package)
end
def work_package_present_and_parent?
@work_package.nil? ? true : @work_package.children.count < 1
def is_leaf_or_nil?(work_package)
work_package.nil? ? true : work_package.children.empty?
end
end
end

Loading…
Cancel
Save