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