 
     (when-let [title (:title idea)]
       (and (seq title)
-           (some (comp #{title} :title) @db/ideas)))
+           (some (comp #{title} :title) (district-ideas @db/selected-district))))
     (assoc :title (str (snippet :title) " " (snippet :already-used)))
 
     (empty? (:category idea))

  "Update errors atom, and return true if there were any errors."
  [doc]
  (let [errors (validate-idea @doc)]
    (prn errors)
    (swap! doc assoc :errors errors)
    (empty? errors)))


(defn normalize-idea [idea]
  (-> idea
      (update :urls #(into [] (vals (apply sorted-set %))))
      (assoc :districts [@db/selected-district])))

(defn submit-idea!
  [doc]
