From ce3eabc2039daa8420ec6f33a8caf8fb45248297 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 9 Mar 2015 00:17:08 +0000 Subject: [PATCH 1/1] Remove unreachable code --- app/controllers/changeset_controller.rb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index 38effa14c..e0d75985d 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -241,13 +241,9 @@ class ChangesetController < ApplicationController changeset = Changeset.find(params[:id]) new_changeset = Changeset.from_xml(request.raw_post) - if new_changeset.nil? - render :text => "", :status => :bad_request - else - check_changeset_consistency(changeset, @user) - changeset.update_from(new_changeset, @user) - render :text => changeset.to_xml, :mime_type => "text/xml" - end + check_changeset_consistency(changeset, @user) + changeset.update_from(new_changeset, @user) + render :text => changeset.to_xml, :mime_type => "text/xml" end ## -- 2.39.5