diff --git a/SolarPower/Repository/Implement/UserRepository.cs b/SolarPower/Repository/Implement/UserRepository.cs index fb0a999..d2f6c1f 100644 --- a/SolarPower/Repository/Implement/UserRepository.cs +++ b/SolarPower/Repository/Implement/UserRepository.cs @@ -437,7 +437,7 @@ namespace SolarPower.Repository.Implement END AS EscrowName FROM power_station ps LEFT JOIN company c ON ps.CompanyId = c.Id - WHERE ps.Id NOT IN (SELECT psop.PowerStationId FROM power_station_operation_personnel psop WHERE psop.UserId = @UserId AND psop.Deleted = 0)"; + WHERE ps.Id NOT IN (SELECT psop.PowerStationId FROM power_station_operation_personnel psop WHERE psop.UserId = @UserId AND psop.Deleted = 0) AND ps.Deleted = 0 "; if (!isPlatformLayer) {