diff --git a/app/controllers/dmsf_controller.rb b/app/controllers/dmsf_controller.rb index 37d1de35..b34c18b2 100644 --- a/app/controllers/dmsf_controller.rb +++ b/app/controllers/dmsf_controller.rb @@ -164,6 +164,7 @@ class DmsfController < ApplicationController rescue StandardError => e flash[:error] = e.message Rails.logger.error e.message + return redirect_back(fallback_location: dmsf_folder_path(id: @project, folder_id: @folder)) end end diff --git a/app/models/dmsf_folder.rb b/app/models/dmsf_folder.rb index 5ffdce2f..41308a51 100644 --- a/app/models/dmsf_folder.rb +++ b/app/models/dmsf_folder.rb @@ -295,7 +295,8 @@ class DmsfFolder < ActiveRecord::Base end def custom_values - # We need to response with DmsfFileRevision custom values if DmsfFolder just cover files in the union of the main view + # We need to response with DmsfFileRevision custom values if DmsfFolder just covers files in the union of the main + # view if self.respond_to?(:type) if /^file/.match?(type) return CustomValue.where(customized_type: 'DmsfFileRevision', customized_id: revision_id)