mirror of
https://github.com/penpot/penpot.git
synced 2025-02-02 20:39:09 -05:00
🐛 Fix pointer map related issues on get-page rpc method
mainly used on render.html endpoint which is used by exporter
This commit is contained in:
parent
7733bc4419
commit
ddeb540df6
1 changed files with 8 additions and 2 deletions
|
@ -490,7 +490,10 @@
|
||||||
|
|
||||||
(let [file (get-file conn file-id features)
|
(let [file (get-file conn file-id features)
|
||||||
page-id (or page-id (-> file :data :pages first))
|
page-id (or page-id (-> file :data :pages first))
|
||||||
page (dm/get-in file [:data :pages-index page-id])]
|
page (dm/get-in file [:data :pages-index page-id])
|
||||||
|
page (if (pmap/pointer-map? page)
|
||||||
|
(deref page)
|
||||||
|
page)]
|
||||||
(cond-> (prune-thumbnails page)
|
(cond-> (prune-thumbnails page)
|
||||||
(uuid? object-id)
|
(uuid? object-id)
|
||||||
(prune-objects object-id))))
|
(prune-objects object-id))))
|
||||||
|
@ -516,7 +519,10 @@
|
||||||
[{:keys [::db/pool] :as cfg} {:keys [::rpc/profile-id file-id] :as params}]
|
[{:keys [::db/pool] :as cfg} {:keys [::rpc/profile-id file-id] :as params}]
|
||||||
(dm/with-open [conn (db/open pool)]
|
(dm/with-open [conn (db/open pool)]
|
||||||
(check-read-permissions! conn profile-id file-id)
|
(check-read-permissions! conn profile-id file-id)
|
||||||
(get-page conn params)))
|
|
||||||
|
(binding [pmap/*load-fn* (partial load-pointer conn file-id)]
|
||||||
|
(get-page conn params))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; --- COMMAND QUERY: get-team-shared-files
|
;; --- COMMAND QUERY: get-team-shared-files
|
||||||
|
|
Loading…
Add table
Reference in a new issue