mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
dont compute member list if not complete
This commit is contained in:
parent
18c1f19840
commit
1383483a54
@ -252,10 +252,12 @@ class StatisticService
|
||||
|
||||
def members_list(options = default_options)
|
||||
result = []
|
||||
User.with_role(:member).where('users.created_at >= :start_date AND users.created_at <= :end_date', options).each do |u|
|
||||
result.push OpenStruct.new({
|
||||
date: options[:start_date].to_date
|
||||
}.merge(user_info(u)))
|
||||
User.with_role(:member).includes(:profile).where('users.created_at >= :start_date AND users.created_at <= :end_date', options).each do |u|
|
||||
if !u.need_completion?
|
||||
result.push OpenStruct.new({
|
||||
date: options[:start_date].to_date
|
||||
}.merge(user_info(u)))
|
||||
end
|
||||
end
|
||||
result
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user