diff --git a/api/app/controllers/concerns/api/v1/resourceful.rb b/api/app/controllers/concerns/api/v1/resourceful.rb index 0cfee44682..ca234170be 100644 --- a/api/app/controllers/concerns/api/v1/resourceful.rb +++ b/api/app/controllers/concerns/api/v1/resourceful.rb @@ -73,10 +73,10 @@ def auditing_security? # @param [Symbol] ok # @param [Symbol] error # @return [Symbol] - def build_status_for(model, ok, error, context) + def build_status_for(model, ok, error, _context) return ok unless action_name == "update" || action_name == "create" - model.valid?(context) ? ok : error + model.errors.none? ? ok : error end # @api private