Skip to content

Commit

Permalink
Remove distinct
Browse files Browse the repository at this point in the history
Query already uses union (without all) thus `distinct` can be removed
  • Loading branch information
johha committed Feb 5, 2024
1 parent dc676fb commit d4efe65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/v3/spaces_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def fetch_isolation_segment(guid)
def fetch_running_security_group_guids(space)
space_level_groups = SecurityGroup.where(spaces: space)
global_groups = SecurityGroup.where(running_default: true)
space_level_groups.union(global_groups).distinct.map(&:guid)
space_level_groups.union(global_groups).map(&:guid)
end

def fetch_staging_security_group_guids(space)
Expand Down

0 comments on commit d4efe65

Please sign in to comment.