Skip to content

Commit

Permalink
fix standardrb spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevelito committed Feb 20, 2025
1 parent 048f19d commit fc2342e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/avo/fields/belongs_to_field.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def fill_field(record, key, value, params)
record.send(:"#{polymorphic_as}_id=", nil)
else
found_record = target_resource(record:, polymorphic_model_class: value.safe_constantize).find_record(id_from_param)

record_id = found_record&.send(primary_key.presence || :id)

record.send(:"#{polymorphic_as}_id=", record_id)
Expand Down

0 comments on commit fc2342e

Please sign in to comment.