-
Notifications
You must be signed in to change notification settings - Fork 357
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
Zones - Save NTP settings before assigning vars for edit #2720
Conversation
@chrisarcand 'bdunne' is an invalid assignee, ignoring... |
@miq-bot Go home, you're drunk |
@chrisarcand unrecognized command 'Go', ignoring... Accepted commands are: add_label, assign, close_issue, move_issue, remove_label, rm_label, set_milestone |
@@ -28,8 +28,10 @@ def zone_edit | |||
javascript_flash(:spinner_off => true) | |||
return | |||
end | |||
# zone = @zone.id.blank? ? Zone.new : Zone.find(@zone.id) # Get new or existing record | |||
|
|||
zone_save_ntp_server_settings(@zone) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need this after the @zone.save
to avoid the case where the zone does not yet have an id, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aye, yeah, oops.
d363eb5
to
e087072
Compare
With the changes to NTP settings made in ManageIQ@97088de, calling #add_settings_for_resource calls a save and reload which sets the attributes assigned before the call to their original values, ignoring the assignments from the form. Instead, pull NTP settings outside of zone_set_record_vars, which is supposed to be just setting vars, and save the settings afterward. https://bugzilla.redhat.com/show_bug.cgi?id=1509172
e087072
to
c6b835a
Compare
Checked commit chrisarcand@c6b835a with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
Zones - Save NTP settings before assigning vars for edit (cherry picked from commit 018270b) https://bugzilla.redhat.com/show_bug.cgi?id=1509452
Gaprindashvili backport details:
|
With the changes to NTP settings made in 97088de, calling #add_settings_for_resource calls a save and reload which sets the attributes assigned before the call to their original values, ignoring the assignments from the form.
Instead, pull NTP settings outside of zone_set_record_vars, which is supposed to be just setting vars, and save it beforehand.
https://bugzilla.redhat.com/show_bug.cgi?id=1509172