Skip to content

Commit

Permalink
Refactor function to have an earlier return
Browse files Browse the repository at this point in the history
  • Loading branch information
malchua committed Dec 20, 2024
1 parent b597634 commit 73d2743
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ def shared_namespace_metadata_keys(namespace)
end

def aggregated_samples_count # rubocop:disable Metrics/AbcSize
aggregated_samples_count = samples_count
return samples_count unless shared_namespaces.any?

return aggregated_samples_count unless shared_namespaces.any?
aggregated_samples_count = samples_count

projects_ids = []
shared_groups.self_and_descendants.where(type: [Namespaces::ProjectNamespace.sti_name])
Expand Down

0 comments on commit 73d2743

Please sign in to comment.