Skip to content

Commit

Permalink
Don't reset new record state.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpendragon committed Sep 14, 2021
1 parent e502152 commit d81d2ae
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/valkyrie/persistence/composite_persister.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ def save(resource:, external_resource: false)
# Don't pass opt lock tokens to other persisters
internal_resource = cached_resource.dup
internal_resource.clear_optimistic_lock_token!
# Reset new_record to avoid not-saved checks.
internal_resource.new_record = resource.new_record
rest.inject(internal_resource) { |m, persister| persister.save(resource: m, external_resource: true) }
# return the one with the desired opt lock token
cached_resource
Expand Down

0 comments on commit d81d2ae

Please sign in to comment.