Skip to content

Commit 28a0371

Browse files
fix(action): fix get_ids_from_request helper call on related data (#695)
1 parent d8b4f84 commit 28a0371

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

app/services/forest_liana/resources_getter.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,17 @@ def self.related_data?(attributes)
166166
def self.related_data_params(attributes, user)
167167
parent_model = SchemaUtils.find_model_from_collection_name(attributes[:parent_collection_name])
168168
model = parent_model.reflect_on_association(attributes[:parent_association_name].to_sym)
169-
[parent_model, model, attributes.merge(collection: attributes[:parent_collection_name]), user]
169+
170+
[
171+
parent_model,
172+
model,
173+
attributes.merge(
174+
collection: attributes[:parent_collection_name],
175+
id: attributes[:parent_collection_id],
176+
association_name: attributes[:parent_association_name]
177+
),
178+
user
179+
]
170180
end
171181

172182
def self.fetch_ids(resources_getter)

0 commit comments

Comments
 (0)