 (defn get-public-badge-content-modal [ctx badge-id user-id]
   (let [badge (g/public-multilanguage-badge-content ctx badge-id user-id)
                                         ;badge (g/select-common-badge-content {:id badge-id} (into {:result-set-fn first} (get-db ctx)))
-        badge-content (first (filter #(= (:language_code %) (:default_language_code %)) (get-in badge [:badge :content]))) ;(g/select-badge-criteria-issuer-by-date {:badge_id badge-id} (into {:result-set-fn first} (get-db ctx)))
+        badge-content (first (filter #(= (:language_code %) (:default_language_code %)) (get-in badge [:badge :content])))] ;(g/select-badge-criteria-issuer-by-date {:badge_id badge-id} (into {:result-set-fn first} (get-db ctx)))
         ;recipients (g/select-badge-recipients {:badge_id badge-id} (get-db ctx))
-        ]
+
     (hash-map :name (:name badge-content)
               :image_file (:image_file badge-content)
               :item_owner_id  (vec (map :id (:public_users badge)))

                     :activated (:activated user)
                     :has_password? (:has_password user)
                     :service user-services})))


(defn get-badge-modal [ctx badgeid]
  (let [badge  (b/get-badge ctx badgeid nil)


(defn delete-badges! [ctx badge-id subject message]
  (try+
   (let [user-ids (select-users-id-by-badge-id {:badge_id badge-id} (into {:row-fn :user_id} (get-db ctx)))
         users-email (select-users-email {:user_id user-ids} (into {:result-set-fn vec :row-fn :email} (get-db ctx)))]
     (if (and (< 1 (count subject)) (< 1 (count message)))
       (m/send-mail ctx subject message users-email))
