fix error

This commit is contained in:
chiu 2020-03-04 12:40:31 +08:00
parent c31463d83d
commit 43f92c9bd6
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ class PaperCriteria
def epaper_topics 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).can_display
tmp = EPaperTopic.where(:period.gte => self.start_date, :period.lte => self.end_date).limit(1) if tmp.first.nil? tmp = EPaperTopic.where(:period.gte => self.start_date, :period.lte => self.end_date).limit(1) if tmp.first.nil?
tmp
end end
def other_emails_ids def other_emails_ids