Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add owning_org_content_ids to base_field_keys #2485

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/models/edition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ def base_field_keys
panopticon_id
overview
slug
owning_org_content_ids
]
end

Expand Down
2 changes: 2 additions & 0 deletions test/models/edition_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,13 @@ def draft_second_edition_from(published_edition)
version_number: 1,
overview: "I am a test overview",
in_beta: true,
owning_org_content_ids: %w[org-1],
)
clone_edition = edition.build_clone
assert_equal "I am a test overview", clone_edition.overview
assert_equal true, clone_edition.in_beta
assert_equal 2, clone_edition.version_number
assert_equal %w[org-1], clone_edition.owning_org_content_ids
end

test "cloning can only occur from a published edition" do
Expand Down
Loading