From 9fe49b5546cbfd6f4174a6fe24e3cfa26b6a223f Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 31 Mar 2023 12:37:31 +0200 Subject: [PATCH] :bug: Fix unexpected responste truncation related to shared links that contains old data that is not used but can be still present on the table; we should consider right now to proceed to delete the row completly --- backend/src/app/rpc/commands/viewer.clj | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/src/app/rpc/commands/viewer.clj b/backend/src/app/rpc/commands/viewer.clj index 136bc309b..f61df10c6 100644 --- a/backend/src/app/rpc/commands/viewer.clj +++ b/backend/src/app/rpc/commands/viewer.clj @@ -31,7 +31,14 @@ links (->> (db/query conn :share-link {:file-id file-id}) (mapv (fn [row] - (update row :pages db/decode-pgarray #{})))) + (-> row + (update :pages db/decode-pgarray #{}) + ;; NOTE: the flags are deprecated but are still present + ;; on the table on old rows. The flags are pgarray and + ;; for avoid decoding it (because they are no longer used + ;; on frontend) we just dissoc the column attribute from + ;; row. + (dissoc :flags))))) fonts (db/query conn :team-font-variant {:team-id (:team-id project)