fix error

This commit is contained in:
chiu 2020-03-04 12:18:30 +08:00
parent b1663fd9b8
commit c31463d83d
1 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,8 @@ class PaperCriteria
def epaper_topics def epaper_topics
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?
end end
def other_emails_ids def other_emails_ids