From e70b0cc6c682d4ff9a280fa82106842f8a13c157 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Mon, 25 Nov 2013 12:56:32 +0100 Subject: [PATCH] #178 - Error 500 cannot access Administration -> Custom Fields page --- lib/redmine_dmsf/patches/custom_fields_helper.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/redmine_dmsf/patches/custom_fields_helper.rb b/lib/redmine_dmsf/patches/custom_fields_helper.rb index 63a9d1fd..78b47608 100644 --- a/lib/redmine_dmsf/patches/custom_fields_helper.rb +++ b/lib/redmine_dmsf/patches/custom_fields_helper.rb @@ -28,11 +28,10 @@ module RedmineDmsf end def custom_fields_tabs_with_customer_tab - cf = {:name => 'DmsfFileRevisionCustomField', :partial => 'custom_fields/index', :label => :dmsf} - unless CustomField::CUSTOM_FIELDS_NAMES.include?(cf[:name]) - CustomField::CUSTOM_FIELDS_TABS << cf - CustomField::CUSTOM_FIELDS_NAMES << cf[:name] - end + cf = {:name => 'DmsfFileRevisionCustomField', :partial => 'custom_fields/index', :label => :dmsf} + unless custom_fields_tabs_without_customer_tab.index { |f| f[:name] == cf[:name] } + custom_fields_tabs_without_customer_tab << cf + end custom_fields_tabs_without_customer_tab end end