Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bugfix: obs update redirect bug.

  • Loading branch information...
commit 96fca31bf2370fe6828c77d3d6920285554b6995 1 parent f5f5d79
@kueda kueda authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  app/controllers/observations_controller.rb
View
2  app/controllers/observations_controller.rb
@@ -570,7 +570,7 @@ def update
unique_user_ids = @observations.map(&:user_id).uniq
if unique_user_ids.size > 1 || unique_user_ids.first != observation_user.id && !current_user.has_role?(:admin)
flash[:error] = "You don't have permission to edit that observation."
- return redirect_to @observation
+ return redirect_to (@observation || observations_path)
end
# Convert the params to a hash keyed by ID. Yes, it's weird
Please sign in to comment.
Something went wrong with that request. Please try again.