Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Commit

Permalink
use new_record? instead of new_object?
Browse files Browse the repository at this point in the history
  • Loading branch information
mejackreed committed Nov 7, 2016
1 parent f621c4f commit 7087691
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/dor/models/versionable.rb
Expand Up @@ -25,7 +25,7 @@ def open_new_version(opts = {})
vmd_ds = datastreams['versionMetadata']
vmd_ds.sync_then_increment_version sdr_version
vmd_ds.content = vmd_ds.ng_xml.to_s
vmd_ds.save unless self.new_object?
vmd_ds.save unless self.new_record?

k = :create_workflows_ds
if opts.key?(k)
Expand Down
2 changes: 1 addition & 1 deletion spec/dor/versionable_spec.rb
Expand Up @@ -31,7 +31,7 @@ class VersionableItem < ActiveFedora::Base
expect(Dor::Config.workflow.client).to receive(:get_active_lifecycle).with('dor', dr, 'submitted').and_return(nil)
expect(Sdr::Client).to receive(:current_version).and_return(1)
expect(obj).to receive(:create_workflow).with('versioningWF')
allow(obj).to receive(:new_object?).and_return(false)
expect(obj).to receive(:new_record?).and_return(false)
expect(vmd_ds).to receive(:save)
end

Expand Down

0 comments on commit 7087691

Please sign in to comment.