Skip to content

Commit 41263ec

Browse files
committed
Use the same code to detect membership
1 parent 3d8c756 commit 41263ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/costs/app/models/hourly_rate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def self.history_for_user(usr) # rubocop:disable Metrics/AbcSize
6363

6464
projects_with_costs.each do |project|
6565
project_rates = rates_by_project.fetch(project, [])
66-
next if project_rates.empty? && usr.members.none? { |m| m.project_id == project.id }
66+
next if project_rates.empty? && usr.projects.exclude?(project)
6767

6868
rates[project] = project_rates
6969
end

0 commit comments

Comments
 (0)