diff --git a/app/models/user.rb b/app/models/user.rb index 15fc25fdd..0cb71b804 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -273,7 +273,14 @@ class User < ActiveRecord::Base number_of_experiments += pr.experiments.count end statistics[:number_of_experiments] = number_of_experiments - statistics[:number_of_protocols] = added_protocols.count + statistics[:number_of_protocols] = + added_protocols.where( + protocol_type: Protocol.protocol_types.slice( + :in_repository_private, + :in_repository_public, + :in_repository_archived + ).values + ).count statistics end