Skip to content

Commit

Permalink
portal.do: Accept externalid as alternative to externalids
Browse files Browse the repository at this point in the history
Required for proper backwards compatibility of legacy API.
  • Loading branch information
heralden committed Feb 15, 2022
1 parent 25892b1 commit 9d4306d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/cljs/bluegenes/events/boot.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -572,17 +572,18 @@
(reg-event-fx
:handle-link-in
(fn [{db :db} [_ {:keys [target data]}]]
(let [{:keys [default-object-types]} (get-in db [:mines (:current-mine db)])]
(case target
:upload {:dispatch
(if (str/blank? (:externalids data))
(case target
:upload (let [{:keys [default-object-types]} (get-in db [:mines (:current-mine db)])
identifiers (or (:externalids data) (:externalid data))]
{:dispatch
(if (str/blank? identifiers)
[:messages/add
{:markup [:span "No identifiers specified when linking in to upload page. You have been redirected to the home page."]
:style "warning"
:timeout 0}]
[:bluegenes.components.idresolver.events/parse-staged-files
nil
(:externalids data)
identifiers
{:case-sensitive false
:type (or (:class data)
(-> default-object-types first name))
Expand Down

0 comments on commit 9d4306d

Please sign in to comment.