🐛 Fix problem with import with default grids

This commit is contained in:
alonso.torres 2021-07-06 12:19:11 +02:00
parent 3eb209b602
commit 60b29a3bf5

View file

@ -27,7 +27,7 @@
(log/set-level! :trace) (log/set-level! :trace)
;; Upload changes batches size ;; Upload changes batches size
(def change-batch-size 100) (def ^:const change-batch-size 100)
(defn get-file (defn get-file
"Resolves the file inside the context given its id and the data" "Resolves the file inside the context given its id and the data"
@ -212,7 +212,8 @@
data (-> (cip/parse-data type node) data (-> (cip/parse-data type node)
(resolve-data-ids type context) (resolve-data-ids type context)
(assoc :id (resolve old-id))) (cond-> (some? old-id)
(assoc :id (resolve old-id))))
file (case type file (case type
:frame (fb/add-artboard file data) :frame (fb/add-artboard file data)
@ -225,8 +226,6 @@
:svg-raw (fb/create-svg-raw file data) :svg-raw (fb/create-svg-raw file data)
#_default file)] #_default file)]
(assert (some? old-id) "ID not found")
;; We store this data for post-processing after every shape has been ;; We store this data for post-processing after every shape has been
;; added ;; added
(cond-> file (cond-> file