(cloud) Saving things now update the search index
This commit is contained in:
@@ -22,7 +22,8 @@
|
||||
[clj-time.core :as time]
|
||||
[clojure.tools.logging :as log]
|
||||
[com.brunobonacci.mulog :as mu]
|
||||
[datomic.api :as dc]))
|
||||
[datomic.api :as dc]
|
||||
[auto-ap.solr :as solr]))
|
||||
|
||||
(defn ->graphql [invoice user ]
|
||||
(if (= "admin" (:user/role user))
|
||||
@@ -176,6 +177,7 @@
|
||||
(assert-invoice-amounts-add-up in)
|
||||
|
||||
(let [transaction-result (audit-transact [(add-invoice-transaction in)] (:id context))]
|
||||
(solr/touch-with-ledger (get-in transaction-result [:tempids "invoice"]))
|
||||
(-> (d-invoices/get-by-id (get-in transaction-result [:tempids "invoice"]))
|
||||
(->graphql (:id context)))))
|
||||
|
||||
@@ -231,6 +233,7 @@
|
||||
:invoice/scheduled-payment (coerce/to-date scheduled_payment)}]
|
||||
(audit-transact [[:upsert-invoice updated-invoice]]
|
||||
(:id context))
|
||||
(solr/touch-with-ledger id)
|
||||
(-> (d-invoices/get-by-id id)
|
||||
(->graphql (:id context)))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user