mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Fixed org_admin administration dashboard error.
Fixed error accessing admin dashboard by passing organization_id attribute. Fixes #1933
This commit is contained in:
parent
e1e0bdb4fc
commit
61fcc262c8
1 changed files with 3 additions and 3 deletions
|
|
@ -595,11 +595,11 @@ class Conference < ApplicationRecord
|
|||
# * +ActiveRecord+
|
||||
def self.get_active_conferences_for_dashboard
|
||||
result = Conference.where('start_date > ?', Time.now)
|
||||
.select('id, short_title, color, start_date')
|
||||
.select('id, short_title, color, start_date, organization_id')
|
||||
|
||||
if result.empty?
|
||||
result = Conference
|
||||
.select('id, short_title, color, start_date').limit(2)
|
||||
.select('id, short_title, color, start_date, organization_id').limit(2)
|
||||
.order(start_date: :desc)
|
||||
end
|
||||
result
|
||||
|
|
@ -611,7 +611,7 @@ class Conference < ApplicationRecord
|
|||
# ====Returns
|
||||
# * +ActiveRecord+
|
||||
def self.get_conferences_without_active_for_dashboard(active_conferences)
|
||||
result = Conference.select('id, short_title, color, start_date').order(start_date: :desc)
|
||||
result = Conference.select('id, short_title, color, start_date, organization_id').order(start_date: :desc)
|
||||
result - active_conferences
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue