diff --git a/src/clj/auto_ap/handler.clj b/src/clj/auto_ap/handler.clj index 230d9940..5d36a059 100644 --- a/src/clj/auto_ap/handler.clj +++ b/src/clj/auto_ap/handler.clj @@ -195,11 +195,20 @@ (map :db/id (:user/clients identity)) (seq x-clients) - x-clients)) + (->> x-clients + (map (fn [c] + (if (string? c) + (try + (Long/parseLong c) + (catch Exception e + nil)) + c))) + (filter #(not (nil? %))) + set))) + limited-clients (some->> (limited-clients identity) (map :db/id ) set) - client-ids (if (= "admin" (:user/role identity)) ideal-ids (set/intersection ideal-ids