From 56237671ed55a210abb7e864364fbe8a5058e514 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 19 Aug 2020 13:03:37 +0200 Subject: [PATCH] :bug: Properly raise not found exception on get-by-id helper. --- backend/src/app/db.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/app/db.clj b/backend/src/app/db.clj index 7a8f7cbb5..78016e29d 100644 --- a/backend/src/app/db.clj +++ b/backend/src/app/db.clj @@ -131,7 +131,7 @@ (:for-update opts) (assoc :suffix "for update")) 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)) res)))