Open
Description
Issue:
GET /dictionaries returns 500 error Cannot read properties of undefined (reading 'codeList')
Description:
Lectern is storing Dictionary with missing property values
on if.conditions.match. This missing property on match
object throws the described error 500.
Steps to reproduce:
- Create new Dictionary on Lectern POST
/dictionaries
with an IF condition havingmatch
withvalues
. e.g.
"restrictions": [
{
"if": {
"conditions": [
{
"fields": [
"organism"
],
"match": {
"values": "Influenza A virus"
}
}
]
},
"then": {
"required": true,
"codeList": "#/list/influenza_a_virus_gene_list"
}
}
]
Expect response: 200 OK
Actual response: 200 OK
- GET /dictionaries with the name/version provided.
Expect: 200 OK
Actual Response: 500 Internal Server Error
{
"error": "TypeError",
"message": "Cannot read properties of undefined (reading 'codeList')"
}