diff options
| author | Teddy Wing | 2017-11-09 11:46:42 +0100 | 
|---|---|---|
| committer | cedricnjanga | 2017-11-13 17:52:54 +0100 | 
| commit | 8602bf7a265f32fc84f609eca790c9a76a723be0 (patch) | |
| tree | 11f38cf4badd0d5d63ca479309dd84fd8c3d0d81 /app/models | |
| parent | 406726c7d9f1d98a36e263c57a1fa361003cface (diff) | |
| download | chouette-core-8602bf7a265f32fc84f609eca790c9a76a723be0.tar.bz2 | |
Revert "ComplianceCheckSet#update_status: Should return a boolean"
This reverts commit b7477e28f90c961079c7b12c4992071cbc11b2d6.
This logic isn't right. We should return true/false based on the result
of `update`, as in, whether the value was able to be updated, instead of
on the contents of the status.
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/compliance_check_set.rb | 10 | 
1 files changed, 2 insertions, 8 deletions
diff --git a/app/models/compliance_check_set.rb b/app/models/compliance_check_set.rb index 66ef6822e..062c5f4a4 100644 --- a/app/models/compliance_check_set.rb +++ b/app/models/compliance_check_set.rb @@ -23,12 +23,10 @@ class ComplianceCheckSet < ActiveRecord::Base        case resource.status        when 'ERROR'          update(status: 'failed') - -        return false +        return        when 'WARNING'          update(status: 'warning') - -        return false +        return        else          resource.status        end @@ -36,11 +34,7 @@ class ComplianceCheckSet < ActiveRecord::Base      if all_statuses_are_ok(statuses)        update(status: 'successful') - -      return true      end - -    false    end    private  | 
