X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/35be1120925e43b6c2aaf470a13aebae25cddb51..23f568cf3a0f4a5f102952ebe68d6d2636e82b1b:/app/controllers/amf_controller.rb diff --git a/app/controllers/amf_controller.rb b/app/controllers/amf_controller.rb index 4c9dbb114..fb50b6aad 100644 --- a/app/controllers/amf_controller.rb +++ b/app/controllers/amf_controller.rb @@ -376,8 +376,9 @@ class AmfController < ApplicationController timestamp = DateTime.strptime(timestamp.to_s, "%d %b %Y, %H:%M:%S") old_way = OldWay.where("way_id = ? AND timestamp <= ?", id, timestamp).unredacted.order("timestamp DESC").first unless old_way.nil? - points = old_way.get_nodes_revert(timestamp) - unless old_way.visible + if old_way.visible + points = old_way.get_nodes_revert(timestamp) + else return [-1, "Sorry, the way was deleted at that time - please revert to a previous version.", id] end end