]> git.openstreetmap.org Git - rails.git/commitdiff
Allow (un)subscribing discussions also when changeset still open
authormmd-osm <mmd.osm@gmail.com>
Sat, 16 Dec 2017 12:32:04 +0000 (13:32 +0100)
committermmd-osm <mmd.osm@gmail.com>
Sat, 16 Dec 2017 12:32:04 +0000 (13:32 +0100)
Fixes #1627

app/controllers/changeset_controller.rb

index 8fbbe1362605992668f143909d89d88a83f83550..329cbd79c07fe3b9d21a278c5438d8116acfe7ce 100644 (file)
@@ -357,7 +357,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
@@ -378,7 +377,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