fix nil error

This commit is contained in:
chiu 2020-02-10 19:42:44 +08:00
parent 8da83ec1c0
commit 8414cee650
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class JournalPaper
title << self.journal_title if self.journal_title.present?
title << self.vol_no if (self.vol_no.present? && self.vol_no != "0")
title << self.issue_no if (self.issue_no.present? && self.issue_no != "0")
title << "pp"+self.form_to_start+"-"+self.form_to_end if (self.form_to_start.present? && self.form_to_start != "0")
title << "pp"+self.form_to_start.to_s+"-"+self.form_to_end.to_s if (self.form_to_start.present? && self.form_to_start != "0")
title << ( !self.journal_levels.blank? ? "(#{self.journal_levels.collect{|x| x.title}.join(', ')})" : nil)
# if !self.publication_date.nil?
# pd = self.publication_date.strftime("%Y-%m-%d").split('-')