From 60668f1940dde98d72d5c87efd92ef76de77a6ef Mon Sep 17 00:00:00 2001 From: Bryce Date: Wed, 6 Sep 2023 14:14:22 -0700 Subject: [PATCH] handler fixes for poke --- src/clj/auto_ap/handler.clj | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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