mirror of
https://github.com/penpot/penpot.git
synced 2025-03-15 17:21:17 -05:00
🐛 Backport comments decoding from develop
Mainly for backward compatibility with database layout on comments tables from develop / v2.5
This commit is contained in:
parent
404297f837
commit
54e7551d56
1 changed files with 3 additions and 2 deletions
|
@ -29,10 +29,11 @@
|
||||||
;; --- GENERAL PURPOSE INTERNAL HELPERS
|
;; --- GENERAL PURPOSE INTERNAL HELPERS
|
||||||
|
|
||||||
(defn- decode-row
|
(defn- decode-row
|
||||||
[{:keys [participants position] :as row}]
|
[{:keys [participants position mentions] :as row}]
|
||||||
(cond-> row
|
(cond-> row
|
||||||
(db/pgpoint? position) (assoc :position (db/decode-pgpoint position))
|
(db/pgpoint? position) (assoc :position (db/decode-pgpoint position))
|
||||||
(db/pgobject? participants) (assoc :participants (db/decode-transit-pgobject participants))))
|
(db/pgobject? participants) (assoc :participants (db/decode-transit-pgobject participants))
|
||||||
|
(db/pgarray? mentions) (assoc :mentions (db/decode-pgarray mentions #{}))))
|
||||||
|
|
||||||
(def xf-decode-row
|
(def xf-decode-row
|
||||||
(map decode-row))
|
(map decode-row))
|
||||||
|
|
Loading…
Add table
Reference in a new issue