diff --git a/vendor/built_in_modules/personal_book/app/models/writing_book.rb b/vendor/built_in_modules/personal_book/app/models/writing_book.rb index 159fc770d..e6359f9d8 100644 --- a/vendor/built_in_modules/personal_book/app/models/writing_book.rb +++ b/vendor/built_in_modules/personal_book/app/models/writing_book.rb @@ -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(', ') diff --git a/vendor/built_in_modules/personal_conference/app/models/writing_conference.rb b/vendor/built_in_modules/personal_conference/app/models/writing_conference.rb index 669a3af4c..8b5ab9e94 100644 --- a/vendor/built_in_modules/personal_conference/app/models/writing_conference.rb +++ b/vendor/built_in_modules/personal_conference/app/models/writing_conference.rb @@ -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? diff --git a/vendor/built_in_modules/personal_journal/app/models/writing_journal.rb b/vendor/built_in_modules/personal_journal/app/models/writing_journal.rb index 430deb43a..415198b9d 100644 --- a/vendor/built_in_modules/personal_journal/app/models/writing_journal.rb +++ b/vendor/built_in_modules/personal_journal/app/models/writing_journal.rb @@ -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")