mirror of
https://github.com/penpot/penpot.git
synced 2025-05-30 10:56:10 +02:00
🐛 Fix wrong conn handling on some function on storage.
This commit is contained in:
parent
151e36df0e
commit
0c30d53d95
1 changed files with 2 additions and 3 deletions
|
@ -181,14 +181,13 @@
|
||||||
;; --- impl
|
;; --- impl
|
||||||
|
|
||||||
(defn resolve-backend
|
(defn resolve-backend
|
||||||
[{:keys [conn] :as storage} backend-id]
|
[{:keys [conn pool] :as storage} backend-id]
|
||||||
(us/assert some? conn)
|
|
||||||
(let [backend (get-in storage [:backends backend-id])]
|
(let [backend (get-in storage [:backends backend-id])]
|
||||||
(when-not backend
|
(when-not backend
|
||||||
(ex/raise :type :internal
|
(ex/raise :type :internal
|
||||||
:code :backend-not-configured
|
:code :backend-not-configured
|
||||||
:hint (str/fmt "backend '%s' not configured" backend-id)))
|
:hint (str/fmt "backend '%s' not configured" backend-id)))
|
||||||
(assoc backend :conn conn)))
|
(assoc backend :conn (or conn pool))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Garbage Collection Task
|
;; Garbage Collection Task
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue