mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Allow max_attendees to be nil
This commit is contained in:
parent
65ee166570
commit
528243c8b9
7 changed files with 50 additions and 41 deletions
|
|
@ -13,8 +13,7 @@ class Program < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def with_registration_open
|
||||
where(require_registration: true, state: :confirmed).
|
||||
map { |e| e if e.max_attendees > e.registrations.count }.compact
|
||||
select { |e| e if e.registration_possible? }
|
||||
end
|
||||
|
||||
# All confirmed events of the conference with attribute require_registration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue