|
|
@ -19,10 +19,9 @@ module API |
|
|
|
r.delay = declared_params[:delay_id] |
|
|
|
r.delay = declared_params[:delay_id] |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
if relation.valid? |
|
|
|
if relation.valid? && relation.save |
|
|
|
model = ::API::V3::WorkPackages::RelationModel.new(relation) |
|
|
|
model = ::API::V3::WorkPackages::RelationModel.new(relation) |
|
|
|
representer = ::API::V3::WorkPackages::RelationRepresenter.new(model, work_package: relation.to) |
|
|
|
representer = ::API::V3::WorkPackages::RelationRepresenter.new(model, work_package: relation.to) |
|
|
|
relation.save! |
|
|
|
|
|
|
|
representer |
|
|
|
representer |
|
|
|
else |
|
|
|
else |
|
|
|
fail Errors::Validation.new(relation) |
|
|
|
fail Errors::Validation.new(relation) |
|
|
|