From 6d6443dcafd1fb959e2fd4f23df9f41012b21dba Mon Sep 17 00:00:00 2001 From: Andreas Edvardsson Date: Sun, 16 Oct 2022 14:13:23 +0200 Subject: [PATCH] Fix bug in :db/default attribute operation --- src/com/biffweb/impl/xtdb.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/biffweb/impl/xtdb.clj b/src/com/biffweb/impl/xtdb.clj index 3ce47127..8548a3ba 100644 --- a/src/com/biffweb/impl/xtdb.clj +++ b/src/com/biffweb/impl/xtdb.clj @@ -180,8 +180,8 @@ (= op :db/add) [k (apply + (or v-before 0) xs)] :let [[default-value] xs] (= op :db/default) (if (contains? doc-before k) - v-before - default-value)))) + [k v-before] + [k default-value])))) (into {}))) (b/defnc lookup-info [db doc-id]