From 5f5a1708276e77304a39cb85581c8577cd4d500e Mon Sep 17 00:00:00 2001 From: wandji20 Date: Tue, 3 Oct 2023 09:49:57 +0100 Subject: [PATCH] Fix counter issue in repository export modal [SCI-9165] --- app/services/toolbars/repositories_service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/toolbars/repositories_service.rb b/app/services/toolbars/repositories_service.rb index ffcd1c296..895fda9f7 100644 --- a/app/services/toolbars/repositories_service.rb +++ b/app/services/toolbars/repositories_service.rb @@ -12,6 +12,7 @@ module Toolbars @current_team = current_team @repositories = Repository.readable_by_user(current_user) .where(id: repository_ids) + .distinct @repository = @repositories.first @archived_state = @repositories.all.any?(&:archived?) @single = @repositories.uniq.length == 1