Draft: Validate all constraints on classifications in the Django admin
Closes #1000, requires Django 4.0.5
This adds proper validation to ensure that we cannot create a classification with an ML class from another corpus, and that we cannot create classifications that violate the two unique constraints on element, worker_version, ml_class
.
This however hits a bug where the rendering of a read-only field in a TabularInline
in an invalid state causes an AttributeError
; the unique constraint validation works, but rendering the form with an error message catches fire. This has been fixed already (Trac ticket — Commit on the 4.0.x branch), but it is not yet released!