Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EH-1700: Give zero duration if jakso is not found from eHOKS #289

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
kestot (nh/oppijan-jaksojen-kestot
concurrent-jaksot opiskeluoikeudet)
jakso-key (nh/ids jakso)]
(if-let [new-kesto (get kestot jakso-key)]
(if-let [new-kesto (get kestot jakso-key 0)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tää on sikäli bugialtista, että olis kuviteltavissa, että kestot-mapista puuttuu kyseinen avain jostain muusta syystä kuin siksi, että kesto yritettiin laskea mutta epäonnistuttiin. Mun puolesta näin voi tehdä, mutta enemmän eksplisiittisiä mahdollisuuksia olis esim. että oppijan-jaksojen-kestot laittais kestot-mappiin jonku :jaksoa-ei-loydy-keywordin numeron sijaan silloin ku laskennassa on joku ongelma.

Vakavuus: ehdotus

(do
(log/info "Updating jakso" jakso-key "with kesto" new-kesto)
(tc/update-jakso jakso
Expand Down