diff --git a/backend/src/app/rpc/commands/files.clj b/backend/src/app/rpc/commands/files.clj index 1d14b75de..ca081eac4 100644 --- a/backend/src/app/rpc/commands/files.clj +++ b/backend/src/app/rpc/commands/files.clj @@ -490,7 +490,10 @@ (let [file (get-file conn file-id features) 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) (uuid? object-id) (prune-objects object-id)))) @@ -516,7 +519,10 @@ [{:keys [::db/pool] :as cfg} {:keys [::rpc/profile-id file-id] :as params}] (dm/with-open [conn (db/open pool)] (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