changeset 527:af95d9a7507a feature_36

fixed wrong institution name retrieval for users with no ssamr_user_details
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Mon, 25 Jul 2011 14:57:48 +0100
parents 930258005822
children 7c7199e1f174 4fc8e79dc0ee
files vendor/plugins/redmine_bibliography/lib/bibliography/user_author_patch.rb
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/lib/bibliography/user_author_patch.rb	Mon Jul 25 14:53:53 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/lib/bibliography/user_author_patch.rb	Mon Jul 25 14:57:48 2011 +0100
@@ -39,10 +39,8 @@
           
           info[:name_on_paper] = "No Name"
           info[:email] = self.mail
-          if self.ssamr_user_detail
-            info[:institution]  = self.ssamr_user_detail.institution
-          else
-            info[:institution] = "No institution"
+          if not self.ssamr_user_detail.nil?
+            info[:institution]  = self.ssamr_user_detail.institution_name
           end
         end