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+
|
# * +ActiveRecord+
|
||||||
def self.get_active_conferences_for_dashboard
|
def self.get_active_conferences_for_dashboard
|
||||||
result = Conference.where('start_date > ?', Time.now)
|
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?
|
if result.empty?
|
||||||
result = Conference
|
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)
|
.order(start_date: :desc)
|
||||||
end
|
end
|
||||||
result
|
result
|
||||||
|
|
@ -611,7 +611,7 @@ class Conference < ApplicationRecord
|
||||||
# ====Returns
|
# ====Returns
|
||||||
# * +ActiveRecord+
|
# * +ActiveRecord+
|
||||||
def self.get_conferences_without_active_for_dashboard(active_conferences)
|
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
|
result - active_conferences
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue