CentreForDigitalHumanities / CentreForDigitalHumanities/Textcavator
Corpus form: field validation not run
- Dominant language
- Python
- Stars
- 12
- Forks
- 3
- Avg merge
- 3d 3m
- Merged PRs (30d)
- 9
Description
When you create a corpus using the corpus form, the `validators` for the `Field` model are never run. (This does not happen automatically when you use `save()` on a model instance, it would need to be explicitly called.)
`Field` contains two validators. One of these is a set of permitted characters; this is always met if you use the form, which will generate field names as slugs. The other is to check for overlap with forbidden field names; this can happen, and would lead to serious bugs when searching the corpus.
Solution:
1. Field validators should be run when creating a corpus through the API.
2. Ideally, this specific issue of forbidden names is avoided altogether. I'll make a separate issue for that.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.