# HG changeset patch # User luisf # Date 1380634380 -3600 # Node ID 0e40e05048eb7eb748b0221c6eae15cfd7673c83 # Parent 48d9b3ae9e1a7c9dc08e37fe4e06866fb35949f1 fixed institution getter for Author model diff -r 48d9b3ae9e1a -r 0e40e05048eb plugins/redmine_bibliography/app/models/author.rb --- a/plugins/redmine_bibliography/app/models/author.rb Tue Oct 01 14:29:01 2013 +0100 +++ b/plugins/redmine_bibliography/app/models/author.rb Tue Oct 01 14:33:00 2013 +0100 @@ -19,6 +19,10 @@ } def institution - self.authorship.first.institution + if self.authorships.first.nil? + "" + else + self.authorships.first.institution + end end end