mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 15:05:26 +08:00
Merge pull request #280 from okriuchykhin/ok_SCI_658
Show only protocols from Protocol Management in users statistics [SCI-658]
This commit is contained in:
commit
091cb0005e
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue