Why?:
Probably a latent issue in public.users_individuals. Patients must be owned or, at least, co-owned by Admin. Related to #332
Check:
select ui.internal_id
from public.users_individuals ui
where ui."user" = '';
Solution:
Check if for a given internal_id there is, at least, one real user:
select ui.internal_id from public.users_individuals ui where ui."user" = ''
except
select ui.internal_id from public.users_individuals ui where ui."user" <> '';
It must return Zero rows.
Apply fix:
delete from public.users_individuals where "user" = '';
Why?: Probably a latent issue in
public.users_individuals
. Patients must be owned or, at least, co-owned byAdmin
. Related to #332Check:
Solution: Check if for a given
internal_id
there is, at least, one real user:It must return Zero rows.
Apply fix: