diff --git a/app/presenters/homepage_presenter.rb b/app/presenters/homepage_presenter.rb index 7110af073..c7a50682c 100644 --- a/app/presenters/homepage_presenter.rb +++ b/app/presenters/homepage_presenter.rb @@ -97,7 +97,7 @@ private when :lettings then @user.lettings_logs when :sales then @user.sales_logs end - query = query.where(created_by: @user) if @user.data_provider? + query = query.where(assigned_to: @user) if @user.data_provider? query.filter_by_year(year) .where(status:) .count