X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/a83030dab7512c4b2848e777f7a7dbff456774b3..079ee9747162f88bf71217769f4221eff5fb38fd:/app/controllers/changeset_controller.rb

diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb
index f294d23d5..56fab0fc4 100644
--- a/app/controllers/changeset_controller.rb
+++ b/app/controllers/changeset_controller.rb
@@ -353,7 +353,6 @@ class ChangesetController < ApplicationController
 
     # Find the changeset and check it is valid
     changeset = Changeset.find(id)
-    raise OSM::APIChangesetNotYetClosedError, changeset if changeset.is_open?
     raise OSM::APIChangesetAlreadySubscribedError, changeset if changeset.subscribers.exists?(current_user.id)
 
     # Add the subscriber
@@ -374,7 +373,6 @@ class ChangesetController < ApplicationController
 
     # Find the changeset and check it is valid
     changeset = Changeset.find(id)
-    raise OSM::APIChangesetNotYetClosedError, changeset if changeset.is_open?
     raise OSM::APIChangesetNotSubscribedError, changeset unless changeset.subscribers.exists?(current_user.id)
 
     # Remove the subscriber
@@ -509,7 +507,7 @@ class ChangesetController < ApplicationController
   # restrict changes to those closed during a particular time period
   def conditions_time(changesets, time)
     if time.nil?
-      return changesets
+      changesets
     elsif time.count(",") == 1
       # if there is a range, i.e: comma separated, then the first is
       # low, second is high - same as with bounding boxes.
@@ -519,10 +517,10 @@ class ChangesetController < ApplicationController
       raise OSM::APIBadUserInput, "bad time range" if times.size != 2
 
       from, to = times.collect { |t| Time.parse(t) }
-      return changesets.where("closed_at >= ? and created_at <= ?", from, to)
+      changesets.where("closed_at >= ? and created_at <= ?", from, to)
     else
       # if there is no comma, assume its a lower limit on time
-      return changesets.where("closed_at >= ?", Time.parse(time))
+      changesets.where("closed_at >= ?", Time.parse(time))
     end
     # stupid Time seems to throw both of these for bad parsing, so
     # we have to catch both and ensure the correct code path is taken.