0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-15 11:38:24 -05:00

🐛 Properly raise not found exception on get-by-id helper.

This commit is contained in:
Andrey Antukh 2020-08-19 13:03:37 +02:00
parent 5a2ba515b8
commit 56237671ed

View file

@ -131,7 +131,7 @@
(:for-update opts) (:for-update opts)
(assoc :suffix "for update")) (assoc :suffix "for update"))
res (exec-one! ds (jdbc-bld/for-query table params opts) opts)] res (exec-one! ds (jdbc-bld/for-query table params opts) opts)]
(when (:deleted-at res) (when (or (:deleted-at res) (not res))
(ex/raise :type :not-found)) (ex/raise :type :not-found))
res))) res)))