Fixes invoice uploads
This commit is contained in:
@@ -184,14 +184,16 @@
|
||||
matches))
|
||||
|
||||
(defn search [context args _]
|
||||
(let [search-query (str "name:(" (cleanse-query (:query args)) ")")]
|
||||
|
||||
(if-let [query (not-empty (cleanse-query (:query args)))]
|
||||
(let [search-query (str "name:(" query ")")]
|
||||
|
||||
|
||||
(for [{:keys [id name]} (solr/query solr/impl "vendors" {"query" (cond-> search-query
|
||||
(not (is-admin? (:id context))) (str " hidden:false"))
|
||||
"fields" "id, name"})]
|
||||
{:id (Long/parseLong id)
|
||||
:name (first name)})))
|
||||
(for [{:keys [id name]} (solr/query solr/impl "vendors" {"query" (cond-> search-query
|
||||
(not (is-admin? (:id context))) (str " hidden:false"))
|
||||
"fields" "id, name"})]
|
||||
{:id (Long/parseLong id)
|
||||
:name (first name)}))
|
||||
[]))
|
||||
|
||||
(def single-thread (ex/fixed-thread-executor 1))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user