Skip to content

Draft: Validate all constraints on classifications in the Django admin

Erwan Rouchet requested to merge admin-classification-constraints into master

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 ticketCommit on the 4.0.x branch), but it is not yet released!

Merge request reports

Loading