From fd015ae08bfa18da1b94cd7d7228e26189019c94 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Fri, 22 May 2020 14:31:58 +0200 Subject: [PATCH] Downloaded files count limit exceeded error is not displayed --- app/controllers/dmsf_controller.rb | 1 + app/models/dmsf_folder.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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)