From 43f92c9bd6b08dc003d10d28a71d3302401edd35 Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 4 Mar 2020 12:40:31 +0800 Subject: [PATCH] fix error --- app/models/paper_criteria.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/paper_criteria.rb b/app/models/paper_criteria.rb index 80405d8..8569e22 100644 --- a/app/models/paper_criteria.rb +++ b/app/models/paper_criteria.rb @@ -18,6 +18,7 @@ class PaperCriteria def epaper_topics tmp = EPaperTopic.where(:period.gte => self.start_date, :period.lte => self.end_date).can_display tmp = EPaperTopic.where(:period.gte => self.start_date, :period.lte => self.end_date).limit(1) if tmp.first.nil? + tmp end def other_emails_ids