Skip to content

Commit

Permalink
Fixed schema problem
Browse files Browse the repository at this point in the history
  • Loading branch information
pitkamak committed Jan 22, 2025
1 parent 5ec80b3 commit 5b8b80a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
5 changes: 2 additions & 3 deletions src/clj/ataru/applications/application_service.clj
Original file line number Diff line number Diff line change
Expand Up @@ -563,21 +563,20 @@
distinct
(filter some?)
(person-service/get-persons person-service))
applications-with-persons-and-tutkinnot (map (fn [application]
applications-with-persons (map (fn [application]
(assoc application
:person (->> (:person-oid application)
(get onr-persons)
(person-service/parse-person-with-master-oid application))))
applications)
;TODO lisää tutkinnot
hakukohteiden-ehdolliset (delay (hakukohteiden-ehdolliset valinta-tulos-service applications))
skip-answers-to-preserve-memory? (if (not-empty included-ids)
(<= 200000 (count applications))
(<= 4500 (count applications)))
lang (keyword (or (-> session :identity :lang) :fi))]
(when skip-answers-to-preserve-memory? (log/warn "Answers will be skipped to preserve memory"))
(if-let [xls (ByteArrayInputStream. (excel/export-applications liiteri-cas-client
applications-with-persons-and-tutkinnot
applications-with-persons
application-reviews
application-review-notes
selected-hakukohde
Expand Down
14 changes: 8 additions & 6 deletions src/clj/ataru/applications/excel_export.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
kasittelymerkinnat-field-labels]]
[ataru.files.file-store :as file-store]
[ataru.forms.form-store :as form-store]
[ataru.applications.application-store :as application-store]
[ataru.koodisto.koodisto :as koodisto]
[ataru.tarjonta-service.tarjonta-parser :as tarjonta-parser]
[ataru.translations.texts :refer [excel-texts virkailija-texts]]
Expand Down Expand Up @@ -751,12 +752,13 @@
person (:person application)
; Getting ehdollinen? is quite expensive operation. Do it later and only if ehdollinen-column is included.
ehdollinen? (delay (get-ehdollinen? get-hakukohde hakukohteiden-ehdolliset application selected-hakukohde-oids))
tutkinnot (some->> (when
(tutkinto-util/koski-tutkinnot-in-application? application) (:person-oid application))
(koski/get-tutkinnot-for-oppija koski-service false)
:opiskeluoikeudet
(parse-koski-tutkinnot tutkinto-levels)
(tutkinto-util/sort-koski-tutkinnot))]
tutkinnot (when (tutkinto-util/koski-tutkinnot-in-application? application)
(if (tutkinto-util/save-koski-tutkinnot? form)
(application-store/koski-tutkinnot-for-application (:key application))
(some->> (:person-oid application)
(koski/get-tutkinnot-for-oppija koski-service false)
:opiskeluoikeudet
(parse-koski-tutkinnot tutkinto-levels))))]
(write-application! liiteri-cas-client
row-writer
application
Expand Down
3 changes: 2 additions & 1 deletion src/cljc/ataru/schema/form_properties_schema.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
(s/defschema TutkintoProperties
(merge FormCategoryProperties
{(s/optional-key :show-completed-studies) s/Bool
(s/optional-key :save-koski-tutkinnot) s/Bool}))
(s/optional-key :save-koski-tutkinnot) s/Bool
(s/optional-key :koski-update-allways) s/Bool}))

(s/defschema FormProperties
{(s/optional-key :auto-expand-hakukohteet) s/Bool
Expand Down

0 comments on commit 5b8b80a

Please sign in to comment.