File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -238,14 +238,7 @@ def reflect_relationship?(relationship, options)
238238
239239 def _create_to_many_links ( relationship_type , relationship_key_values , options )
240240 relationship = self . class . _relationships [ relationship_type ]
241-
242- # check if relationship_key_values are already members of this relationship
243241 relation_name = relationship . relation_name ( context : @context )
244- existing_relations = @model . public_send ( relation_name ) . where ( relationship . primary_key => relationship_key_values )
245- if existing_relations . count > 0
246- # todo: obscure id so not to leak info
247- fail JSONAPI ::Exceptions ::HasManyRelationExists . new ( existing_relations . first . id )
248- end
249242
250243 if options [ :reflected_source ]
251244 @model . public_send ( relation_name ) << options [ :reflected_source ] . _model
You can’t perform that action at this time.
0 commit comments