aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorTeddy Wing2017-11-13 16:27:49 +0100
committercedricnjanga2017-11-13 17:52:54 +0100
commite57f45bd6478baeab25ae96ae688587dda85247f (patch)
tree5b5bac8670fbf295921e1d04c0cb46641f7b68b2 /app
parent5dd6b2f963d3ae732c6f56112e5f5ac56b6c2764 (diff)
downloadchouette-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')
-rw-r--r--app/models/compliance_check_set.rb2
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