           persons (get params :persons [])
           persons (if (vector? persons) persons [persons])]
       (d/insert
-       db/events (d/values [{:id (UUID/fromString id)
+       db/events (d/values [{:id (to-uuid id)
                              :name (:name params)
-                             :convention_id (UUID/fromString conv_id)}]))
+                             :convention_id (to-uuid conv_id)}]))
       (doseq [person persons]
         (d/insert
-         db/events-persons (d/values [{:convention_id (UUID/fromString conv_id)
-                                       :event_id (UUID/fromString id)
-                                       :person_id (UUID/fromString person)}])))
+         db/events-persons (d/values [{:convention_id (to-uuid conv_id)
+                                       :event_id (to-uuid id)
+                                       :person_id (to-uuid person)}])))
       (notifications/send-notification [:events conv_id])
       (solve conv_id)
       (status (response {:id id}) 201))))
 
 (defn- retrieve-event [id]
-  (first (d/select db/events (d/where {:id (UUID/fromString id)}))))
-
-(defn- to-uuid [input]
-  (if (instance? UUID input)
-    input
-    (UUID/fromString input)))
+  (first (d/select db/events (d/where {:id (to-uuid id)}))))
 
 (defn- get-person-ids [id]
   (sort (map #(-> % :person_id str) (d/select db/events-persons (d/where {:event_id (to-uuid id)})))))

      (let [conv_id (:convention_id event)
            preferred_slot (if (= "" preferred_slot) nil preferred_slot)]
        (if (contains? params :preferred_slot)
          (d/update db/events (d/set-fields {:preferred_slot_id preferred_slot}) (d/where {:id (UUID/fromString id)})))
        (if (-> event_count nil? not)
          (d/update db/events (d/set-fields {:event_count event_count}) (d/where {:id (UUID/fromString id)})))
        (if (-> name nil? not)
          (d/update db/events (d/set-fields {:name name}) (d/where {:id (UUID/fromString id)})))
        (if (-> type nil? not)
          (do
            (println "event type" type (get event-type-map type))
            (d/update db/events (d/set-fields {:event_type (get event-type-map (keyword type))}) (d/where {:id (UUID/fromString id)}))))

        (if (-> person nil? not)
          (let [persons (get-person-ids id)]

   [clojure.set :refer [map-invert]])
  (:import
   [java.util UUID]))

(defn- to-uuid [input]
  (cond
    (instance? UUID input) input
    (nil? input) input
    :else (UUID/fromString input)))

(defn validate-new-event [params]
  (first
