diff options
| author | Luc Donnet | 2018-04-08 22:23:28 +0200 | 
|---|---|---|
| committer | Luc Donnet | 2018-04-08 22:23:45 +0200 | 
| commit | 602b8f898cb83d72823da0c19fc496bc719bb73a (patch) | |
| tree | 543233a1666db3a10e018faaf8883cca7628a485 /app | |
| parent | 1702598111630f8bad9003241ce1d002028a4054 (diff) | |
| download | chouette-core-602b8f898cb83d72823da0c19fc496bc719bb73a.tar.bz2 | |
Fix test when control_attributes or keys not exist Refs #6177 @1
Diffstat (limited to 'app')
| -rw-r--r-- | app/helpers/compliance_controls_helper.rb | 4 | 
1 files changed, 2 insertions, 2 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 | 
