   TODO: handle case of slug change.
   TODO: handle new and updated sections.
   "
-  [slug company]
+  [conn slug company]
   {:pre [(string? slug) (map? company)]}
-  (if-let [original-company (get-company slug)]
+  (if-let [original-company (get-company conn slug)]
     (let [org-id (:org-id company)
           updated-company (-> company
                             (clean)


(schema/defn ->company :- common/Company
  "Take a minimal map describing a company and a user and 'fill the blanks'"
  [company-props user]
  (let [slug (or (:slug company-props) (slug/find-available-slug (:name company-props) (taken-slugs)))]
    (-> company-props
        (assoc :slug slug)
        (update :currency #(or % "USD"))
        (assoc :org-id (:org-id user))
        (complete-real-sections user)
        (categories-for)
        (sections-for))))

(schema/defn ^:private add-updated-at
  "Add `:updated-at` key with `ts` as value to a given section.


(defn get-company
  "Given the slug of the company, retrieve it from the database, or return nil if it doesn't exist."
  [conn slug]
  {:pre [(string? slug)]}
  (common/read-resource conn table-name slug))

(defn- core-placeholder-sections
  "Return a map of section-name -> section containing just the core
