From: Tom Hughes Date: Mon, 9 Mar 2015 00:17:08 +0000 (+0000) Subject: Remove unreachable code X-Git-Tag: live~4754 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/ce3eabc2039daa8420ec6f33a8caf8fb45248297?hp=9f263dd9c324ae9774e333da48361e8d0e9129ec Remove unreachable code --- 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 ##