                                                :else
                                                (sql2 (str "select_" method "unassigned_plot"))))]
                      (do
-                       (unlock_plots user-id)
+                       (unlock-plots user-id)
                        (call-sql "lock_plot"
                                  (:plot_id plot-info)
                                  user-id

                    (Timestamp. collection-start)
                    user-samples
                    user-images]))
    (unlock_plots user-id)
    (data-response "")))

(defn flag-plot [{:keys [params]}]
  (let [plot-id (tc/str->int (:plotId params))
        user-id (:userId params -1)]
    (call-sql "flag_plot" plot-id user-id nil)
    (unlock_plots user-id)
    (data-response "")))

    (data-response "")))

(defn release-plot-locks [{:keys [params]}]
  (unlock-plots (:userId params -1))
  (data-response ""))

(defn- get-collection-plot [params method]
