Skip to content

Commit

Permalink
🐞 election-title_i18n is not applied everywhere (#318)
Browse files Browse the repository at this point in the history
Parent issue: sequentech/meta#268
  • Loading branch information
Findeton committed Oct 10, 2023
1 parent 501837e commit 6b35e93
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion iam/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
'type': dict
},
{
'check': 'dict-keys-exact',
'check': 'dict-keys-exist',
'keys': ['id', 'title', 'events']
},
{
Expand Down Expand Up @@ -173,6 +173,25 @@
}
]
},
{
'check': 'index-check-list',
'index': 'title_i18n',
'optional': True,
'check-list': [
{
'check': 'isinstance',
'type': dict
},
{ # keys are strings
'check': 'lambda',
'lambda': lambda d: all([isinstance(k, str) for k in d.keys()])
},
{ # values are strings
'check': 'lambda',
'lambda': lambda d: all([isinstance(k, str) for k in d.values()])
},
]
},
{
'check': 'index-check-list',
'index': 'events',
Expand Down

0 comments on commit 6b35e93

Please sign in to comment.