diff --git a/nexus/db-queries/src/db/datastore/vpc.rs b/nexus/db-queries/src/db/datastore/vpc.rs index ae4db4813f..ea3a7d5ca0 100644 --- a/nexus/db-queries/src/db/datastore/vpc.rs +++ b/nexus/db-queries/src/db/datastore/vpc.rs @@ -1496,8 +1496,9 @@ impl DataStore { .eq(subnet_dsl::custom_router_id)), ) .filter(subnet_dsl::time_deleted.is_null()) - .filter(subnet_dsl::vpc_id.is_null()) + .filter(subnet_dsl::vpc_id.eq(vpc_id)) .filter(router_dsl::time_deleted.is_null()) + .filter(router_dsl::vpc_id.eq(vpc_id)) .select((VpcSubnet::as_select(), VpcRouter::as_select())) .load_async(&*self.pool_connection_authorized(opctx).await?) .await