Skip to content

Commit b233f24

Browse files
committed
Cut unnecessary org query
1 parent 9c72962 commit b233f24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/services/service_key.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def validate
4747
validates_unique [:name, :service_instance_id]
4848

4949
if service_instance
50-
space_ids_for_org_dataset = Space.where(organization_id: space.organization.id).select(:id)
50+
space_ids_for_org_dataset = Space.where(organization_id: space.organization_id).select(:id)
5151
MaxServiceKeysPolicy.new(
5252
self,
5353
ServiceKey.filter(service_instance: ServiceInstance.where(space_id: space_ids_for_org_dataset)),

0 commit comments

Comments
 (0)