Rescue when member plugin's publication_date is nil
This commit is contained in:
1 parent
8af5112d24
commit
01ca178060
3 files changed
+12
-8
No files matched your search
@@ -91,9 +91,10 @@ class WritingBook
|
||||
title << self.publisher if self.publisher.present?
|
||||
title << self.isbn if self.isbn.present?
|
||||
|
||||
pd = self.publish_date.strftime("%Y-%m-%d").split('-')
|
||||
|
||||
title << pd[0]+"/"+pd[1]
|
||||
if !self.publish_date.nil?
|
||||
pd = self.publish_date.strftime("%Y-%m-%d").split('-')
|
||||
title << pd[0]+"/"+pd[1]
|
||||
end
|
||||
|
||||
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
|
||||
title.join(', ')
|
||||
|
||||
+4
-2
@@ -88,9 +88,11 @@ class WritingConference
|
||||
|
||||
title << self.authors if self.authors.present?
|
||||
|
||||
pd = self.publication_date.strftime("%Y-%m-%d").split('-')
|
||||
if !self.publication_date.nil?
|
||||
pd = self.publication_date.strftime("%Y-%m-%d").split('-')
|
||||
title << pd[0]
|
||||
end
|
||||
|
||||
title << pd[0]
|
||||
title << self.paper_title if self.paper_title.present?
|
||||
title << self.conference_title if self.conference_title.present?
|
||||
title << self.location if self.location.present?
|
||||
|
||||
@@ -94,9 +94,10 @@ class WritingJournal
|
||||
|
||||
title << self.authors if self.authors.present?
|
||||
|
||||
pd = self.publication_date.strftime("%Y-%m-%d").split('-')
|
||||
|
||||
title << pd[0]
|
||||
if !self.publication_date.nil?
|
||||
pd = self.publication_date.strftime("%Y-%m-%d").split('-')
|
||||
title << pd[0]
|
||||
end
|
||||
title << self.paper_title if self.paper_title.present?
|
||||
title << self.journal_title if self.journal_title.present?
|
||||
title << self.vol_no if (self.vol_no.present? && self.vol_no != "0")
|
||||
|
||||
Reference in new issue
Block a user