Commit 597af8e4 authored by Jonas Waeber's avatar Jonas Waeber

Add institution teaser color

parent e19f1cea
Pipeline #21983 failed with stages
in 4 minutes and 34 seconds
......@@ -34,7 +34,7 @@ ext {
dependencies {
compile group: 'org.elasticsearch.client', name: 'elasticsearch-rest-high-level-client', version: '7.6.1'
implementation 'org.memobase:memobase-service-utilities:2.0.13'
implementation 'org.memobase:memobase-service-utilities:2.0.14'
implementation 'org.apache.jena:apache-jena:3.14.0'
// Logging Framework
......
......@@ -18,6 +18,7 @@
package org.memobase
import ch.memobase.rdf.MB
import ch.memobase.rdf.NS
import com.beust.klaxon.JsonArray
import com.beust.klaxon.JsonObject
......@@ -113,16 +114,16 @@ class InstitutionSearchDocBuilder(
numberOfDocuments = recordSetIds
.map { value -> elasticSearchWrapper.countNumberOfDocuments(value) }
.sum(),
teaserColor = institution[KEYS.teaserColor].let {
teaserColor = institution[MB.institutionTeaserColor.localName].let {
if (it == null) {
log.error("No teaser colour found for institution $id.")
log.warn("No teaser colour found for institution $id.")
""
} else
it as String
},
teaserColorComputed = institution[KEYS.teaserColorComputed].let {
teaserColorComputed = institution[MB.institutionComputedTeaserColor.localName].let {
if (it == null) {
log.error("No computed teaser colour found for institution $id.")
log.warn("No computed teaser colour found for institution $id.")
""
} else
it as String
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment