Skip to content

Commit e03c0de

Browse files
authored
Update watchers_helper_patch.rb
If a group is among issue's watchers, calling `preload(:email_address)` causes Error 500 as there is no `email_address` in Group class.
1 parent 6e5b1a1 commit e03c0de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/redmine_git_hosting/patches/watchers_helper_patch.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def watcher_css_with_git_hosting(objects)
2424
def watchers_list_with_git_hosting(object)
2525
remove_allowed = User.current.allowed_to? "delete_#{object.class.name.underscore}_watchers".tr('/', '_').to_sym, object.project
2626
content = +''.html_safe
27-
object.watcher_users.preload(:email_address).each do |user|
27+
object.watcher_users.each do |user|
2828
s = +''.html_safe
2929
s << avatar(user, size: '16').to_s
3030
s << link_to_user(user, class: 'user')

0 commit comments

Comments
 (0)