Skip to content

Commit

Permalink
Fix associated record saving
Browse files Browse the repository at this point in the history
  • Loading branch information
rcrenshaw committed Aug 2, 2022
1 parent 5ccedfe commit b047f33
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/odbc_adapter/concerns/insert_attribute_stripper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ def save_internal(base_function, **options, &block)
else
stripped_attributes = {}
end
base_function.call(**options, &block)
first_call_result = base_function.call(**options, &block)
if stripped_attributes.any?
restore_stripped_attributes(stripped_attributes)
base_function.call(**options, &block)
return base_function.call(**options, &block)
else
return first_call_result
end
end
end
Expand Down

0 comments on commit b047f33

Please sign in to comment.