X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/baf10cd39289cd7e94a819305e46f43e85a136c6..5cbd4038edb32b0304bd766e70fc680ea447b52b:/app/controllers/old_controller.rb diff --git a/app/controllers/old_controller.rb b/app/controllers/old_controller.rb index 002da675c..9d7cf2113 100644 --- a/app/controllers/old_controller.rb +++ b/app/controllers/old_controller.rb @@ -53,16 +53,15 @@ class OldController < ApplicationController def redact redaction_id = params['redaction'] - unless redaction_id.nil? + if redaction_id.nil? + # if no redaction ID was provided, then this is an unredact + # operation. + @old_element.redact!(nil) + else # if a redaction ID was specified, then set this element to # be redacted in that redaction. redaction = Redaction.find(redaction_id.to_i) @old_element.redact!(redaction) - - else - # if no redaction ID was provided, then this is an unredact - # operation. - @old_element.redact!(nil) end # just return an empty 200 OK for success