       ; FIXME there might be a case where two first revision of a collection come in at the same time
       ;; they might accidentally get different concept ids. We'd need to recur then.
       )))
-
 
 (defn- try-to-save
   "Try to save a concept by looping until we find a good revision-id or give up."

                               messages/invalid-revision-id-msg
                               0
                               revision-id))))))



(defn- set-deleted-flag [value concept] (assoc concept :deleted value))


  )

(defn- set-or-generate-concept-id 
  "Get an existing concept-id from the DB for the given concept or generate one 
  if the concept has never been saved."
  [db concept]
  (if (:concept-id concept) 
