Add project UUID filter to device query in DeviceService

This commit is contained in:
faris Aljohari
2025-02-17 01:15:48 -06:00
parent 29d9909c8e
commit 6fbeef97df

View File

@ -960,7 +960,12 @@ export class DeviceService {
await this.validateProject(param.projectUuid);
const devices = await this.deviceRepository.find({
where: { isActive: true },
where: {
isActive: true,
spaceDevice: {
community: { project: { uuid: param.projectUuid } },
},
},
relations: [
'spaceDevice.parent',
'spaceDevice.community',