   ([reconciliation]
    (before-save nil reconciliation))
   ([_ reconciliation]
-   (-> reconciliation
-       (update-in [:status] name))))
+   (update-in reconciliation [:status] name)))
 
 (defn- append-transaction-item-refs
   [reconciliation storage]

       before-validation
       (validation/validate spec rules)))

(defn- after-save
  [storage {item-refs :item-refs :as reconciliation}]
  ; Set reconciled flag on specified transaction items
  (when (and item-refs (seq item-refs))
    (doseq [[item-ref transaction-date] item-refs]
      (set-transaction-item-reconciled storage
                                       (:id reconciliation)
                                       item-ref
                                       transaction-date)))
  reconciliation)

(defn- create*

  (let [existing (find-by-id storage (Integer. (:id reconciliation)))]
    (assoc reconciliation :account-id (:account-id existing))))

(defn- update*
  [storage reconciliation]
  )

(def update
  (update-fn {:spec ::existing-reconciliation
              :before-validation before-validation
              :update update-reconciliation
              :before-save before-save
              :after-save after-save
              :rules-fn validation-rules
              :after-read after-read
              :coercion-rules coercion-rules
              :reload reload}))

(defn delete
  "Removes the specified reconciliation from the system. (Only the most recent may be deleted.)"
