Bug #33972
closed
tailoring_file_profile_selector
Added by Fabio Sbano over 3 years ago.
Updated over 3 years ago.
Description
Hello,
The func "tailoring_file_profile_selector" is retrive tailoring_file.scap_content_profiles.first.id instead of last selection from database
Best Regards,
Fabio Sbano
- Priority changed from Normal to Immediate
I'm sending the fix below
[fsbano@eugenia foreman_openscap]$ diff -Nru app/helpers/policies_helper.rb.orig app/helpers/policies_helper.rb
--- app/helpers/policies_helper.rb.orig 2021-11-22 23:10:17.169304680 -0300
+++ app/helpers/policies_helper.rb 2021-11-22 23:11:19.057530971 -0300
@@ -93,7 +93,7 @@
def tailoring_file_profile_selector(form, tailoring_file)
if tailoring_file
select_f form, :tailoring_file_profile_id, tailoring_file.scap_content_profiles, :id, :title,
- { :selected => tailoring_file.scap_content_profiles.first.id },
+ { :selected => @policy.tailoring_file_profile_id },
{ :label => _("XCCDF Profile in Tailoring File"),
:help_inline => _("This profile will be used to override the one from scap content") }
else
[fsbano@eugenia foreman_openscap]$
Best Regards,
Fabio Sbano
- Pull request https://github.com/theforeman/foreman_openscap/pull/517 added
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman_openscap/pull/518 added
- Fixed in Releases foreman_openscap 5.1.0 added
- Status changed from Ready For Testing to Closed
- Fixed in Releases foreman_openscap 5.2.0 added
- Fixed in Releases deleted (
foreman_openscap 5.1.0)
- Bugzilla link set to 2026718
- Priority changed from Immediate to High
Also available in: Atom
PDF