From 61fcc262c88eeb1eff069a8befe1fdcf64279f67 Mon Sep 17 00:00:00 2001 From: Rishabh Singh Date: Sun, 7 Jan 2018 16:06:50 +0530 Subject: [PATCH] Fixed org_admin administration dashboard error. Fixed error accessing admin dashboard by passing organization_id attribute. Fixes #1933 --- app/models/conference.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/conference.rb b/app/models/conference.rb index 9adac888..03402652 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -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