akuznecov/redmine_auto_watchers_from_groups — pull request #2 by reindeer (2014-12-03 20:48:35+00:00)
Title: fix 404 error if assigned user is empty

If *Assignee* field is empty plugin returns 404 error. This hook should work only if id is not blank

ActiveRecord::RecordNotFound (Couldn't find Group with id= [WHERE `users`.`type` IN ('Group')]):
lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
lib/redmine/hook.rb:61:in `each'
lib/redmine/hook.rb:61:in `block in call_hook'
lib/redmine/hook.rb:58:in `tap'
lib/redmine/hook.rb:58:in `call_hook'
lib/redmine/hook.rb:153:in `call_hook'
app/controllers/issues_controller.rb:469:in `block in save_issue_with_child_records'
app/controllers/issues_controller.rb:458:in `save_issue_with_child_records'
app/controllers/issues_controller.rb:184:in `update'