mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Make calculate_event_distribution use state to group events
Signed-off-by: Carlos Coelho <carlos@vinta.com.br>
This commit is contained in:
parent
9c322d682f
commit
5f7029d28e
1 changed files with 1 additions and 1 deletions
|
|
@ -1029,7 +1029,7 @@ class Conference < ApplicationRecord
|
|||
# * +hash+ -> object_type => {color, value}
|
||||
def calculate_event_distribution(group_by_id, association_symbol, state = nil)
|
||||
grouped = if state
|
||||
program.events.select(group_by_id).where('state = ?', 'confirmed').group(group_by_id)
|
||||
program.events.select(group_by_id).where('state = ?', state).group(group_by_id)
|
||||
else
|
||||
program.events.select(group_by_id).group(group_by_id)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue