Skip to content

Commit

Permalink
https://github.com/StephaneCouturier/Katalog/issues/541
Browse files Browse the repository at this point in the history
  • Loading branch information
StephaneCouturier committed Jul 20, 2024
1 parent 97e41f6 commit c5ac112
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ void Device::loadSubDeviceList()
WITH RECURSIVE hierarchy AS (
SELECT device_id
FROM device
WHERE device_id = :device_id
WHERE device_id = :device_id AND EXISTS (SELECT 1 FROM device WHERE device_id = :device_parent_id)
UNION ALL
SELECT t.device_id
FROM device t
JOIN hierarchy h ON t.device_parent_id = h.device_id
JOIN hierarchy h ON t.device_parent_id = h.device_id AND t.device_id != h.device_id
)
SELECT device_id
FROM hierarchy )
Expand Down

0 comments on commit c5ac112

Please sign in to comment.