mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 15:05:26 +08:00
Show only protocols from Protocol Management in users statistics [SCI-658]
This commit is contained in:
parent
0793fb9f11
commit
ab895ae864
1 changed files with 8 additions and 1 deletions
|
@ -273,7 +273,14 @@ class User < ActiveRecord::Base
|
||||||
number_of_experiments += pr.experiments.count
|
number_of_experiments += pr.experiments.count
|
||||||
end
|
end
|
||||||
statistics[:number_of_experiments] = number_of_experiments
|
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
|
statistics
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue