Skip to content

Commit 3a5dbef

Browse files
committed
avniproject/avni-server#866 | Exclude null values to avoid query failure
1 parent 981cf53 commit 3a5dbef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rwb/src/main/resources/select_inactive_users_id.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ WITH primary_users as (
5959
select distinct user_id, first_name
6060
from primary_users pu
6161
join catchments_without_work_orders_or_atleast_one_open_work_order cat on pu.catchment_id = cat.id
62-
where user_id in (select cuid
63-
from active_user_ids
64-
union
65-
select muid
66-
from active_user_ids);
62+
where user_id not in (select cuid
63+
from active_user_ids where cuid is not null
64+
union
65+
select muid
66+
from active_user_ids where muid is not null);

0 commit comments

Comments
 (0)