aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/helpers/compliance_controls_helper.rb4
-rw-r--r--app/views/referentials/select_compliance_control_set.html.slim2
2 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/compliance_controls_helper.rb b/app/helpers/compliance_controls_helper.rb
index 297ae3afa..abf909929 100644
--- a/app/helpers/compliance_controls_helper.rb
+++ b/app/helpers/compliance_controls_helper.rb
@@ -11,7 +11,7 @@ module ComplianceControlsHelper
def compliance_control_metadatas(compliance_control)
attributes = resource.class.dynamic_attributes
- attributes.push(*resource.control_attributes.keys) if resource.respond_to? :control_attributes
+ attributes.push(*resource.control_attributes.keys) if resource&.control_attributes&.keys
{}.tap do |hash|
attributes.each do |attribute|
@@ -19,4 +19,4 @@ module ComplianceControlsHelper
end
end
end
-end
+end
diff --git a/app/views/referentials/select_compliance_control_set.html.slim b/app/views/referentials/select_compliance_control_set.html.slim
index 3550bb202..7be82364d 100644
--- a/app/views/referentials/select_compliance_control_set.html.slim
+++ b/app/views/referentials/select_compliance_control_set.html.slim
@@ -8,7 +8,7 @@
.row
.col-lg-12
.form-group
- = label_tag 'name', nil, class: 'string required col-sm-4 col-xs-5 control-label'
+ = label_tag ComplianceControlSet.ts, nil, class: 'string required col-sm-4 col-xs-5 control-label'
.col-sm-8.col-xs-7
= select_tag :compliance_control_set, options_from_collection_for_select(@compliance_control_sets, "id", "name"), class: 'select optional form-control'
.separator