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

Fill group_id when widget set is saved in dashboard.rb #7561

Closed

Conversation

lpichler
Copy link
Contributor

@lpichler lpichler commented Jan 8, 2021

Overview -> Dashboards

MiqWidgetSet#group_id is same as MiqWidgetSet#owner_id (+ MiqWidgetSet#owner_type)

and we are adding model validation that group has to be present in some cases.

In UI we populated send just MiqWidgetSet#owner and thanks to callback,
MiqWidgetSet#group_id iswas also stored but it was after validation (and it is late) -
so I also populated MiqWidgetSet#group_id in controller here in this PR so validation can work correctly.

this PR is required for PR

Links

@lpichler
Copy link
Contributor Author

lpichler commented Jan 8, 2021

@miq-bot assign @mzazrivec
@miq-bot add_label bug

@miq-bot
Copy link
Member

miq-bot commented Jan 8, 2021

Checked commit lpichler@c6d4ad1 with ruby 2.6.3, rubocop 0.82.0, haml-lint 0.35.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. 👍

@lpichler
Copy link
Contributor Author

It is not needed because of before_validation from ManageIQ/manageiq#20890

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