From 360c195f1a14828fac2344792e41f90d4b205655 Mon Sep 17 00:00:00 2001 From: Liane Hampe Date: Thu, 15 Feb 2024 08:27:42 +0100 Subject: [PATCH] Adds further condition in DmsfQuery#dmsf_nodes It will make sure that a pending link will be deleted from the query and hence not displayed to the user. A pending link has no project assigned. For those links the case statement in DmsfQuery#dmsf_nodes will now return true what causes the link to be deleted from the query result. --- app/models/dmsf_query.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/dmsf_query.rb b/app/models/dmsf_query.rb index c853e93b..eeaba684 100644 --- a/app/models/dmsf_query.rb +++ b/app/models/dmsf_query.rb @@ -232,6 +232,8 @@ class DmsfQuery < Query !dmsf_link.dmsf_folder.visible? || !DmsfFolder.permissions?(dmsf_link.dmsf_folder, allow_system: false) elsif dmsf_link.project !dmsf_link.project.dmsf_available? + else + !dmsf_link.project&.dmsf_available? end else false