[inventory] don't double-link the children by appending it twice
parent
88576efc04
commit
c31256dde3
|
@ -59,7 +59,7 @@ class InventoryObjectsController < ApplicationController
|
|||
if params[:file_link_id]
|
||||
# TODO: how to constrain this, it passed an untrusted boundary?
|
||||
@file_datum = FileDatum.find(params[:file_link_id])
|
||||
@object.links_to.append(@file_datum.attach_to(@object))
|
||||
@file_datum.attach_to(@object)
|
||||
end
|
||||
|
||||
@file_datum = FileDatum.new unless params[:file_link_id]
|
||||
|
|
Loading…
Reference in New Issue