mirror of
https://github.com/penpot/penpot.git
synced 2026-05-30 04:08:08 +00:00
🐛 Populate is-indirect flag on file libraries from relation graph (#9289)
Co-authored-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
parent
0eb8cabd39
commit
56d8dc678c
@ -843,7 +843,12 @@
|
||||
l.vern,
|
||||
l.is_shared,
|
||||
l.version,
|
||||
fls.synced_at
|
||||
fls.synced_at,
|
||||
NOT EXISTS (
|
||||
SELECT 1 FROM file_library_rel AS direct
|
||||
WHERE direct.file_id = ?::uuid
|
||||
AND direct.library_file_id = l.id
|
||||
) AS is_indirect
|
||||
FROM libs AS l
|
||||
JOIN project AS p
|
||||
ON p.id = l.project_id
|
||||
@ -855,12 +860,8 @@
|
||||
(defn get-file-libraries
|
||||
[conn file-id]
|
||||
(into []
|
||||
(comp
|
||||
;; FIXME: :is-indirect set to false to all rows looks
|
||||
;; completly useless
|
||||
(map #(assoc % :is-indirect false))
|
||||
(map decode-row-features))
|
||||
(db/exec! conn [sql:get-file-libraries file-id file-id])))
|
||||
(map decode-row-features)
|
||||
(db/exec! conn [sql:get-file-libraries file-id file-id file-id])))
|
||||
|
||||
(defn get-resolved-file-libraries
|
||||
"Get all file libraries including itself. Returns an instance of
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user