summaryrefslogtreecommitdiff
path: root/lib/api/services.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/services.rb')
-rw-r--r--lib/api/services.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/api/services.rb b/lib/api/services.rb
index ad856115485..79a5f27dc4d 100644
--- a/lib/api/services.rb
+++ b/lib/api/services.rb
@@ -654,9 +654,7 @@ module API
hash.merge!(key => nil)
end
- if service.update_attributes(attrs.merge(active: false))
- true
- else
+ unless service.update_attributes(attrs.merge(active: false))
render_api_error!('400 Bad Request', 400)
end
end