Permalink
Browse files

Merge pull request #1 from bensonk/master

Fixed a crash when redmine "assign to group" is turned on
  • Loading branch information...
mezza committed Mar 31, 2012
2 parents 90ae7fb + be93aad commit 56179dbd16f0775a0e4c5c24c06658ef8a6b868b
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/auto_watch_hook.rb
View
@@ -5,8 +5,8 @@ def controller_issues_edit_before_save(context = { })
unless @issue.watched_by?(User.current) || @issue.author == User.current
@issue.add_watcher(User.current)
end
- unless @issue.assigned_to == nil || @issue.watched_by?(@issue.assigned_to) || @issue.author == @issue.assigned_to
+ unless @issue.assigned_to == nil || (not @issue.assigned_to === User) || @issue.watched_by?(@issue.assigned_to) || @issue.author == @issue.assigned_to
@issue.add_watcher(@issue.assigned_to)
end
end
-end
+end

0 comments on commit 56179db

Please sign in to comment.