In order to mitigate against the brute force attacks against Gitlab accounts, we are moving to all edu-ID Logins. We would like to remind you to link your account with your edu-id. Login will be possible only by edu-ID after November 30, 2021. Here you can find the instructions for linking your account.

If you don't have a SWITCH edu-ID, you can create one with this guide here

kind regards

This Server has been upgraded to GitLab release 14.2.6

Commit 52c6597a authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Add institution to updates. So we can have list of institutions in documents.

parent 1ad8a776
Pipeline #25080 passed with stages
in 4 minutes and 55 seconds
......@@ -169,10 +169,6 @@ class KafkaTopology(
schema
.map { key, value ->
when (value) {
is InstitutionSearchDoc -> KeyValue(
"$key#update",
updateQueryBuilder.updateInstitutionName(value.id, value.name)
)
is RecordSetSearchDoc -> KeyValue(
"$key#update",
updateQueryBuilder.updateRecordSetName(value.id, value.name)
......@@ -184,10 +180,10 @@ class KafkaTopology(
.mapValues { value -> JsonUtility.queryToJson(value!!) }
.to(updateTopic)
recordSetUpdate(schema, "masterInstitution")
recordSetUpdate(schema, "originalInstitution")
recordSetUpdate(schema, "accessInstitution")
recordSetUpdate(schema, "institution")
}
......@@ -208,6 +204,11 @@ class KafkaTopology(
private fun updateInstitutionContainer(recordSet: RecordSetSearchDoc, targetField: String): UpdateQuery {
return when (targetField) {
"institution" -> updateQueryBuilder.updateInstitutionContainers(
recordSet.id,
targetField,
recordSet.institution
)
"masterInstitution" -> updateQueryBuilder.updateInstitutionContainers(
recordSet.id,
targetField,
......
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