Skip to content

Cannot create a classification with a worker version using an ML class used by an existing manual classification

  1. Pick an ML class and an element.
  2. Create a classification with that class and element without a worker version.
  3. Create the same classification, but with a worker version.
{
    "non_field_errors": [
        "A classification of this worker version already exists for this element and this class."
    ]
}

Doing step 3 then 2 (creating with a worker version then without) will work without causing any error. The database constraints do allow the same ML class to be used twice in this way; it seems it is only an issue with the UniqueTogetherValidator in the serializers.