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

Fixes #18820 - fill in CV id on components #6690

Merged
merged 1 commit into from
Mar 24, 2017

Conversation

jlsherrill
Copy link
Member

during the migration to add latest to component
content views, the content view id field is used
but not populated during the migration.

@jlsherrill
Copy link
Member Author

@parthaa do you mind reviewing?

@@ -0,0 +1,10 @@
class FillInContentViewComponents < ActiveRecord::Migration
def up
Katello::ContentViewComponent.find_each do |cvc|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you need to define this model in the migration ?

@jlsherrill
Copy link
Member Author

@parthaa updated

class FakeContentView < ActiveRecord::Base
self.table_name = 'katello_content_views'

has_many :content_view_components, :class_name => "Katello::FakeContentViewVersion", :dependent => :destroy,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldnt this be something like FillInContentViewComponents::FakeContentViewVersion ?

during the migration to add latest to component
content views, the content view id field is used
but not populated during the migration.
@parthaa
Copy link
Contributor

parthaa commented Mar 24, 2017

ack

@jlsherrill jlsherrill merged commit 798a84b into Katello:master Mar 24, 2017
@jlsherrill jlsherrill deleted the 18820 branch March 24, 2017 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants