From b407d0a43c085bbcbeb235081711e253214aca02 Mon Sep 17 00:00:00 2001 From: Jan Sandbrink Date: Thu, 12 Mar 2015 16:08:20 +0100 Subject: [PATCH] use "try" --- lib/api/v3/work_packages/schema/work_package_schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api/v3/work_packages/schema/work_package_schema.rb b/lib/api/v3/work_packages/schema/work_package_schema.rb index f67529763c..2f26a8b387 100644 --- a/lib/api/v3/work_packages/schema/work_package_schema.rb +++ b/lib/api/v3/work_packages/schema/work_package_schema.rb @@ -59,7 +59,7 @@ module API end def assignable_versions - @work_package.assignable_versions unless @work_package.nil? + @work_package.try(:assignable_versions) end def assignable_priorities