diff options
| author | Teddy Wing | 2017-11-13 16:27:49 +0100 | 
|---|---|---|
| committer | cedricnjanga | 2017-11-13 17:52:54 +0100 | 
| commit | e57f45bd6478baeab25ae96ae688587dda85247f (patch) | |
| tree | 5b5bac8670fbf295921e1d04c0cb46641f7b68b2 /app/models/compliance_check_set.rb | |
| parent | 5dd6b2f963d3ae732c6f56112e5f5ac56b6c2764 (diff) | |
| download | chouette-core-e57f45bd6478baeab25ae96ae688587dda85247f.tar.bz2 | |
ComplianceCheckSet#update_status: Return `true` if no update happened
Return `true` from this method by default. If the `#update` call fails,
then it will return `false`, but in all other cases, we should return
`true`. That way, when the
`Api::V1::ComplianceCheckSetsController#validated` endpoint is called,
it will respond with the `ComplianceCheckSet` object instead of:
    {"status":"error","messages":[]}
with no error messages.
Refs #4757
Diffstat (limited to 'app/models/compliance_check_set.rb')
| -rw-r--r-- | app/models/compliance_check_set.rb | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/compliance_check_set.rb b/app/models/compliance_check_set.rb index 006d14bef..80e499b74 100644 --- a/app/models/compliance_check_set.rb +++ b/app/models/compliance_check_set.rb @@ -33,6 +33,8 @@ class ComplianceCheckSet < ActiveRecord::Base      if statuses_ok_or_ignored?(statuses)        return update(status: 'successful')      end + +    true    end    private  | 
