0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-15 17:21:17 -05:00

🐛 Properly filter removed objects (backend).

This commit is contained in:
Andrey Antukh 2019-12-11 16:34:57 +01:00
parent 6a74f88e6c
commit 87d41700fc
2 changed files with 2 additions and 0 deletions

View file

@ -34,6 +34,7 @@
where pu.user_id = $1
and pu.can_edit = true
and pf.deleted_at is null
and pp.deleted_at is null
window pages_w as (partition by pf.id order by pp.created_at
range BETWEEN UNBOUNDED PRECEDING
AND UNBOUNDED FOLLOWING)")

View file

@ -33,6 +33,7 @@
left join project_file_users as pfu on (pfu.file_id = pf.id)
where ((pfu.user_id = $1 and pfu.can_edit = true) or
(pu.user_id = $1 and pu.can_edit = true))
and pp.deleted_at is null
order by pp.created_at")
;; --- Query: Project Pages (By File ID)