Open
Description
Sentry Issue: STUDIO-HTX
Schema validation error: '' does not match '^[a-z]{2,3}(?:-[a-zA-Z]+)?$'
Failed validating 'pattern' in schema['properties']['topics']['items']['properties']['language']:
{'type': 'string',
'description': 'Language code from '
'https://github.com/learningequality/le-utils/blob/main/le_utils/resources/languagelookup.json',
'pattern': '^[a-z]{2,3}(?:-[a-zA-Z]+)?$'}
On instance['topics'][0]['language']:
''
The request objects is as below. The language passed is empty, triggering the error.
{
"metadata": {
"channel_id": "8121f04e-fde5-44e4-b470-c229b5dffcf4"
},
"topics": [
{
"ancestors": [...],
"description": "",
"id": "a6c7b497-49fc-47fa-8e2c-70b36fb1c893",
"language": "",
"title": "Algebra"
}
]
}